OSDN Git Service

wrap OptSize and MinSize attributes for easier and consistent access (NFCI)
authorSanjay Patel <spatel@rotateright.com>
Tue, 4 Aug 2015 15:49:57 +0000 (15:49 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 4 Aug 2015 15:49:57 +0000 (15:49 +0000)
commitf36098364265e1781b9cbbf2d792aaf907cdc43b
treeec14e684e38dd0be5e3966c0a149d4c22dd7a025
parent2cbb48f2e3b12c50563cc47a1de342e57ae7a561
wrap OptSize and MinSize attributes for easier and consistent access (NFCI)

Create wrapper methods in the Function class for the OptimizeForSize and MinSize
attributes. We want to hide the logic of "or'ing" them together when optimizing
just for size (-Os).

Currently, we are not consistent about this and rely on a front-end to always set
OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here
that should be added as follow-on patches with regression tests.

This patch is NFC-intended: it just replaces existing direct accesses of the attributes
by the equivalent wrapper call.

Differential Revision: http://reviews.llvm.org/D11734

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243994 91177308-0d34-0410-b5e6-96231b3b80d8
27 files changed:
include/llvm/IR/Function.h
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/MachineBlockPlacement.cpp
lib/CodeGen/MachineCombiner.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/TailDuplication.cpp
lib/Target/AArch64/AArch64ConditionalCompares.cpp
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/Thumb2SizeReduction.cpp
lib/Target/Hexagon/HexagonFrameLowering.cpp
lib/Target/X86/X86CallFrameOptimization.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86PadShortFunction.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp