[PATCH] D17555: [Feedback requested] Implement cold spliting
Amaury SECHET via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 23:13:26 PST 2016
deadalnix added a comment.
@joker.eph , this is beneficial for performance for application that are icache and iTLB bound. This works is based on the various patches that were made to use LLVM as a backend for HHVM and was presented here : https://www.youtube.com/watch?v=VZ7A7t5LcR8 .
The optimization is disabled in the general case as it can have negative impact when you aren't icache/itlb bound (for instance bzip).
It may be worthwhile for instrumented build like ASAN and for one shot apps, but I haven't tested this, so don't quote me on this.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:147
@@ -147,3 +146,3 @@
- // Provide LSDA information.
- if (!shouldEmitLSDA)
+void DwarfCFIException::beginFragment(const MachineBasicBlock *MBB,
+ ExceptionSymbolProvider ESP) {
----------------
davidxl wrote:
> Another candidate of NFC refactoring.
No, this need to be extracted as this is now needed twice: one for the regular fragment and once for the cold fragment.
================
Comment at: lib/MC/MCObjectFileInfo.cpp:448
@@ -443,1 +447,3 @@
+ ColdTextSection = Ctx->getELFSection(".text.cold", ELF::SHT_PROGBITS,
+ ELF::SHF_EXECINSTR | ELF::SHF_ALLOC);
----------------
davidxl wrote:
> use .text.unlikely to be consistent with the name used in function reordering.
cold is the term used all over the place so far. It looks like GCC's crowd want to kill .text.unlikely on their side, so I'd advocate to keep it consistent and go for .cold , unless there is a good reason to stick with .unlikely ?
http://reviews.llvm.org/D17555
More information about the llvm-commits
mailing list