mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Whitespace and other cleanup. Functionallity unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
645aef1480
commit
3d26f2333b
@ -1852,7 +1852,6 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
FunctionBBs[i] = BasicBlock::Create(Context, "", F);
|
||||
CurBB = FunctionBBs[0];
|
||||
continue;
|
||||
|
||||
|
||||
case bitc::FUNC_CODE_DEBUG_LOC_AGAIN: // DEBUG_LOC_AGAIN
|
||||
// This record indicates that the last instruction is at the same
|
||||
|
@ -100,8 +100,6 @@ static unsigned GetEncodedBinaryOpcode(unsigned Opcode) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void WriteStringRecord(unsigned Code, const std::string &Str,
|
||||
unsigned AbbrevToUse, BitstreamWriter &Stream) {
|
||||
SmallVector<unsigned, 64> Vals;
|
||||
@ -447,7 +445,6 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
|
||||
Vals.clear();
|
||||
}
|
||||
|
||||
|
||||
// Emit the alias information.
|
||||
for (Module::const_alias_iterator AI = M->alias_begin(), E = M->alias_end();
|
||||
AI != E; ++AI) {
|
||||
@ -1208,7 +1205,7 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST,
|
||||
static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
||||
BitstreamWriter &Stream) {
|
||||
Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4);
|
||||
VE.incorporateFunction(F);
|
||||
VE.IncorporateFunction(F);
|
||||
|
||||
SmallVector<unsigned, 64> Vals;
|
||||
|
||||
@ -1272,7 +1269,7 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
||||
|
||||
if (NeedsMetadataAttachment)
|
||||
WriteMetadataAttachment(F, VE, Stream);
|
||||
VE.purgeFunction();
|
||||
VE.PurgeFunction();
|
||||
Stream.ExitBlock();
|
||||
}
|
||||
|
||||
@ -1512,9 +1509,9 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) {
|
||||
WriteModuleMetadata(M, VE, Stream);
|
||||
|
||||
// Emit function bodies.
|
||||
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||
if (!I->isDeclaration())
|
||||
WriteFunction(*I, VE, Stream);
|
||||
for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F)
|
||||
if (!F->isDeclaration())
|
||||
WriteFunction(*F, VE, Stream);
|
||||
|
||||
// Emit metadata.
|
||||
WriteModuleMetadataStore(M, Stream);
|
||||
|
@ -452,8 +452,7 @@ void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ValueEnumerator::incorporateFunction(const Function &F) {
|
||||
void ValueEnumerator::IncorporateFunction(const Function &F) {
|
||||
InstructionCount = 0;
|
||||
NumModuleValues = Values.size();
|
||||
NumModuleMDValues = MDValues.size();
|
||||
@ -517,7 +516,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) {
|
||||
EnumerateFunctionLocalMetadata(FnLocalMDVector[i]);
|
||||
}
|
||||
|
||||
void ValueEnumerator::purgeFunction() {
|
||||
void ValueEnumerator::PurgeFunction() {
|
||||
/// Remove purged values from the ValueMap.
|
||||
for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i)
|
||||
ValueMap.erase(Values[i].first);
|
||||
|
@ -127,11 +127,11 @@ public:
|
||||
/// should only be used by rare constructs such as address-of-label.
|
||||
unsigned getGlobalBasicBlockID(const BasicBlock *BB) const;
|
||||
|
||||
/// incorporateFunction/purgeFunction - If you'd like to deal with a function,
|
||||
/// IncorporateFunction/PurgeFunction - If you'd like to deal with a function,
|
||||
/// use these two methods to get its data into the ValueEnumerator!
|
||||
///
|
||||
void incorporateFunction(const Function &F);
|
||||
void purgeFunction();
|
||||
void IncorporateFunction(const Function &F);
|
||||
void PurgeFunction();
|
||||
|
||||
private:
|
||||
void OptimizeConstants(unsigned CstStart, unsigned CstEnd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user