[PATCH] D11734: wrap OptSize and MinSize attributes for easier and consistent access (NFCI)

Sanjay Patel spatel at rotateright.com
Mon Aug 3 13:50:31 PDT 2015


spatel created this revision.
spatel added reviewers: mkuper, hfinkel, qcolombet.
spatel added a subscriber: llvm-commits.

This patch obsoletes D11685.

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.

http://reviews.llvm.org/D11734

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11734.31261.patch
Type: text/x-patch
Size: 20577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150803/da619e7c/attachment.bin>


More information about the llvm-commits mailing list