diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2018-05-15 23:36:46 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2018-05-15 23:36:46 +0000 |
commit | 25bef201c57fb8e68cb50c7d3c26fe5e0ebf98af (patch) | |
tree | 1e30372443b630e17e617186f1d70735ef9eed24 /llvm/lib/CodeGen/MachineOutliner.cpp | |
parent | c3f240f7dc0387a6efabb75ee86cd5b453e0b196 (diff) | |
download | bcm5719-llvm-25bef201c57fb8e68cb50c7d3c26fe5e0ebf98af.tar.gz bcm5719-llvm-25bef201c57fb8e68cb50c7d3c26fe5e0ebf98af.zip |
[MachineOutliner] Add optsize markings to outlined functions.
It doesn't matter much this late in the pipeline, but one place that
does check for it is the function alignment code.
Differential Revision: https://reviews.llvm.org/D46373
llvm-svn: 332415
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineOutliner.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index a524fca972e..afee909eaa2 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -1253,6 +1253,14 @@ MachineOutliner::createOutlinedFunction(Module &M, const OutlinedFunction &OF, F->setLinkage(GlobalValue::InternalLinkage); F->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); + // FIXME: Set nounwind, so we don't generate eh_frame? Haven't verified it's + // necessary. + + // Set optsize/minsize, so we don't insert padding between outlined + // functions. + F->addFnAttr(Attribute::OptimizeForSize); + F->addFnAttr(Attribute::MinSize); + // Save F so that we can add debug info later if we need to. CreatedIRFunctions.push_back(F); |