diff options
| author | Hiroshi Yamauchi <yamauchi@google.com> | 2019-11-11 10:59:36 -0800 |
|---|---|---|
| committer | Hiroshi Yamauchi <yamauchi@google.com> | 2019-11-21 14:16:00 -0800 |
| commit | 52e377497ddc3aa7178d4fd4c0cda096df4d8a72 (patch) | |
| tree | 86b84d9ff3012c4c5984b748c99650babd8aabcb /llvm/utils/TableGen | |
| parent | 844d97f650a2d716e63e3be903c32a82f2f817b1 (diff) | |
| download | bcm5719-llvm-52e377497ddc3aa7178d4fd4c0cda096df4d8a72.tar.gz bcm5719-llvm-52e377497ddc3aa7178d4fd4c0cda096df4d8a72.zip | |
[PGO][PGSO] DAG.shouldOptForSize part.
Summary:
(Split of off D67120)
SelectionDAG::shouldOptForSize changes for profile guided size optimization.
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70095
Diffstat (limited to 'llvm/utils/TableGen')
| -rw-r--r-- | llvm/utils/TableGen/GlobalISelEmitter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index fdac5ba90bb..895aa8ab65a 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -5129,6 +5129,14 @@ void GlobalISelEmitter::run(raw_ostream &OS) { SubtargetFeatureInfo::emitComputeAvailableFeatures( Target.getName(), "InstructionSelector", "computeAvailableModuleFeatures", ModuleFeatures, OS); + + if (Target.getName() == "X86" || Target.getName() == "AArch64") { + // TODO: Implement PGSO. + OS << "static bool shouldOptForSize(const MachineFunction *MF) {\n"; + OS << " return MF->getFunction().hasOptSize();\n"; + OS << "}\n\n"; + } + SubtargetFeatureInfo::emitComputeAvailableFeatures( Target.getName(), "InstructionSelector", "computeAvailableFunctionFeatures", FunctionFeatures, OS, |

