[llvm-commits] [llvm] r85008 - in /llvm/trunk/lib/Target/PIC16: AsmPrinter/PIC16AsmPrinter.cpp AsmPrinter/PIC16AsmPrinter.h PIC16ABINames.h PIC16MemSelOpt.cpp PIC16TargetObjectFile.cpp PIC16TargetObjectFile.h
Sanjiv Gupta
sanjiv.gupta at microchip.com
Sat Oct 24 11:19:42 PDT 2009
Author: sgupta
Date: Sat Oct 24 13:19:41 2009
New Revision: 85008
URL: http://llvm.org/viewvc/llvm-project?rev=85008&view=rev
Log:
Revert back 85006 for now as it breaks PIC16 tests.
Modified:
llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
llvm/trunk/lib/Target/PIC16/PIC16ABINames.h
llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp Sat Oct 24 13:19:41 2009
@@ -298,7 +298,6 @@
EmitIData(M);
EmitUData(M);
EmitRomData(M);
- EmitSharedUdata(M);
EmitUserSections(M);
return Result;
}
@@ -371,11 +370,6 @@
EmitSingleSection(PTOF->ROMDATASection());
}
-// Emit Shared section udata.
-void PIC16AsmPrinter::EmitSharedUdata(Module &M) {
- EmitSingleSection(PTOF->SHAREDUDATASection());
-}
-
bool PIC16AsmPrinter::doFinalization(Module &M) {
EmitAllAutos(M);
printLibcallDecls();
Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h (original)
+++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h Sat Oct 24 13:19:41 2009
@@ -55,7 +55,6 @@
void EmitUData (Module &M);
void EmitAllAutos (Module &M);
void EmitRomData (Module &M);
- void EmitSharedUdata(Module &M);
void EmitUserSections (Module &M);
void EmitFunctionFrame(MachineFunction &MF);
void printLibcallDecls();
Modified: llvm/trunk/lib/Target/PIC16/PIC16ABINames.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ABINames.h?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ABINames.h (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ABINames.h Sat Oct 24 13:19:41 2009
@@ -234,12 +234,6 @@
return "romdata.#";
}
- static std::string getSharedUDataSectionName() {
- std::ostringstream o;
- o << getTagName(PREFIX_SYMBOL) << "udata_shr" << ".#";
- return o.str();
- }
-
static std::string getRomdataSectionName(unsigned num,
std::string prefix = "") {
std::ostringstream o;
Modified: llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp Sat Oct 24 13:19:41 2009
@@ -144,7 +144,7 @@
}
// Get the section name(NewBank) for MemOp.
- // This assumes that the section names for globals are already set by
+ // This assumes that the section names for globals are laready set by
// AsmPrinter->doInitialization.
std::string NewBank = CurBank;
if (Op.getType() == MachineOperand::MO_GlobalAddress &&
@@ -156,11 +156,7 @@
std::string Sym = Op.getSymbolName();
NewBank = PAN::getSectionNameForSym(Sym);
}
-
- // If the section is shared section, do not emit banksel.
- if (NewBank == PAN::getSharedUDataSectionName())
- return Changed;
-
+
// If the previous and new section names are same, we don't need to
// emit banksel.
if (NewBank.compare(CurBank) != 0 ) {
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp Sat Oct 24 13:19:41 2009
@@ -72,7 +72,6 @@
case UDATA: UDATASections_.push_back(Entry); break;
case IDATA: IDATASections_.push_back(Entry); break;
case ROMDATA: ROMDATASection_ = Entry; break;
- case UDATA_SHR: SHAREDUDATASection_ = Entry; break;
}
return Entry;
@@ -280,10 +279,7 @@
std::string AddrStr = "Address=";
if (SectName.compare(0, AddrStr.length(), AddrStr) == 0) {
std::string SectAddr = SectName.substr(AddrStr.length());
- if (SectAddr.compare("NEAR") == 0)
- return allocateSHARED(GVar, Mang);
- else
- return allocateAtGivenAddress(GVar, SectAddr);
+ return allocateAtGivenAddress(GVar, SectAddr);
}
// Create the section specified with section attribute.
@@ -293,25 +289,6 @@
return getPIC16DataSection(GV->getSection().c_str(), UDATA);
}
-const MCSection *
-PIC16TargetObjectFile::allocateSHARED(const GlobalVariable *GV,
- Mangler *Mang) const {
- // Make sure that this is an uninitialized global.
- assert(GV->hasInitializer() && "This global doesn't need space");
- if (!GV->getInitializer()->isNullValue()) {
- // FIXME: Generate a warning in this case that near qualifier will be
- // ignored.
- return SelectSectionForGlobal(GV, SectionKind::getDataRel(), Mang, *TM);
- }
- std::string Name = PAN::getSharedUDataSectionName();
-
- PIC16Section *SharedUDataSect = getPIC16DataSection(Name.c_str(), UDATA_SHR);
- // Insert the GV into shared section.
- SharedUDataSect->Items.push_back(GV);
- return SharedUDataSect;
-}
-
-
// Interface used by AsmPrinter to get a code section for a function.
const PIC16Section *
PIC16TargetObjectFile::SectionForCode(const std::string &FnName) const {
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h?rev=85008&r1=85007&r2=85008&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h Sat Oct 24 13:19:41 2009
@@ -56,7 +56,6 @@
mutable std::vector<PIC16Section *> UDATASections_;
mutable std::vector<PIC16Section *> IDATASections_;
mutable PIC16Section * ROMDATASection_;
- mutable PIC16Section * SHAREDUDATASection_;
/// Standard Auto Sections.
mutable std::vector<PIC16Section *> AUTOSections_;
@@ -111,10 +110,6 @@
/// Allocate DATA at user specified address.
const MCSection *allocateAtGivenAddress(const GlobalVariable *GV,
const std::string &Addr) const;
-
- /// Allocate a shared variable to SHARED section.
- const MCSection *allocateSHARED(const GlobalVariable *GV,
- Mangler *Mang) const;
public:
PIC16TargetObjectFile();
@@ -152,9 +147,6 @@
const PIC16Section *ROMDATASection() const {
return ROMDATASection_;
}
- const PIC16Section *SHAREDUDATASection() const {
- return SHAREDUDATASection_;
- }
const std::vector<PIC16Section *> &AUTOSections() const {
return AUTOSections_;
}
More information about the llvm-commits
mailing list