[PATCH] add typeDataQuicker
Michael Spencer
bigcheesegs at gmail.com
Thu Feb 21 21:24:21 PST 2013
Looks fine with these changes.
================
Comment at: include/lld/Core/DefinedAtom.h:126
@@ -125,2 +125,3 @@
typeData, // read-write data
+ typeDataQuicker, // allow data to be quickly accessed
typeZeroFill, // zero-fill data
----------------
typeDataFast
================
Comment at: lib/ReaderWriter/ELF/Atoms.h:252-255
@@ +251,6 @@
+ _symbol->st_shndx < llvm::ELF::SHN_HIPROC)) {
+ const ELFTargetInfo &eti = (_owningFile.getTargetInfo());
+ TargetHandler<ELFT> &TargetHandler = eti.getTargetHandler<ELFT>();
+ TargetAtomHandler<ELFT> &elfAtomHandler =
+ TargetHandler.targetAtomHandler();
+ if (elfAtomHandler.getType(_symbol) == llvm::ELF::STT_COMMON)
----------------
This should be cached.
================
Comment at: lib/ReaderWriter/ELF/DefaultLayout.h:300-301
@@ -298,5 +299,4 @@
return llvm::StringSwitch<Reference::Kind>(name)
- .StartsWith(".init_array", ORDER_INIT_ARRAY)
- .Default(ORDER_DATA);
-
+ .StartsWith(".init_array", ORDER_INIT_ARRAY).Default(ORDER_DATA);
+
case DefinedAtom::typeZeroFill:
----------------
StringSwitch should have one per line.
http://llvm-reviews.chandlerc.com/D446
More information about the llvm-commits
mailing list