1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/include/llvm/IR
Adam Nemet cb89dd6834 [OptRemark,LDist] RFC: Add hotness attribute
Summary:
This is the first set of changes implementing the RFC from
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334

This is a cross-sectional patch; rather than implementing the hotness
attribute for all optimization remarks and all passes in a patch set, it
implements it for the 'missed-optimization' remark for Loop
Distribution.  My goal is to shake out the design issues before scaling
it up to other types and passes.

Hotness is computed as an integer as the multiplication of the block
frequency with the function entry count.  It's only printed in opt
currently since clang prints the diagnostic fields directly.  E.g.:

  remark: /tmp/t.c:3:3: loop not distributed: use -Rpass-analysis=loop-distribute for more info (hotness: 300)

A new API added is similar to emitOptimizationRemarkMissed.  The
difference is that it additionally takes a code region that the
diagnostic corresponds to.  From this, hotness is computed using BFI.
The new API is exposed via an analysis pass so that it can be made
dependent on LazyBFI.  (Thanks to Hal for the analysis pass idea.)

This feature can all be enabled by setDiagnosticHotnessRequested in the
LLVM context.  If this is off, LazyBFI is not calculated (D22141) so
there should be no overhead.

A new command-line option is added to turn this on in opt.

My plan is to switch all user of emitOptimizationRemark* to use this
module instead.

Reviewers: hfinkel

Subscribers: rcox2, mzolotukhin, llvm-commits

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

llvm-svn: 275583
2016-07-15 17:23:20 +00:00
..
Argument.h Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
AssemblyAnnotationWriter.h Prune trailing whitespaces. 2015-09-22 11:19:03 +00:00
Attributes.h Add getReturnedArgOperand to Call/InvokeInst, CallSite 2016-07-10 23:01:32 +00:00
Attributes.td Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
AutoUpgrade.h Objective-C Class Properties: Autoupgrade "Class Properties" module flag. 2016-05-25 23:14:48 +00:00
BasicBlock.h Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics" 2016-05-02 19:43:22 +00:00
CallingConv.h AMDGPU/SI: Add amdgpu_kernel calling convention. Part 1. 2016-05-06 09:07:29 +00:00
CallSite.h Add getReturnedArgOperand to Call/InvokeInst, CallSite 2016-07-10 23:01:32 +00:00
CFG.h Move BB succ_iterator to be inside TerminatorInst. NFC. 2015-08-05 17:43:01 +00:00
CMakeLists.txt Revert r253810. The builds should be fine now. 2015-11-22 16:13:51 +00:00
Comdat.h [NFC] Remove some dead code: 2016-05-11 16:38:40 +00:00
Constant.h Simplify handleOperandChangeImpl() removing last argument (NFC) 2016-02-10 22:47:15 +00:00
ConstantFolder.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ConstantRange.h [ConstantRange] Add an getEquivalentICmp helper 2016-05-19 03:53:06 +00:00
Constants.h [IR] Require ArrayRef of 'uint32_t' instead of 'int' for the mask argument for one of the signatures of CreateShuffleVector. This better emphasises that you can't use it for the -1 as undef behavior. 2016-06-12 00:41:19 +00:00
DataLayout.h [IR] Make getIndexedOffsetInType return a signed result 2016-07-13 03:42:38 +00:00
DebugInfo.h DebugInfo: Remove MDString-based type references 2016-04-23 21:08:00 +00:00
DebugInfoFlags.def [CodeView] Implement support for bitfields in LLVM 2016-06-30 03:00:20 +00:00
DebugInfoMetadata.h [codeview] Add DISubprogram::ThisAdjustment 2016-07-01 02:41:21 +00:00
DebugLoc.h
DerivedTypes.h don't repeat names in documentation comments; NFC 2016-02-25 15:55:28 +00:00
DiagnosticInfo.h [OptRemark,LDist] RFC: Add hotness attribute 2016-07-15 17:23:20 +00:00
DiagnosticPrinter.h Fix -Wextra-semi warnings. 2015-07-22 20:46:11 +00:00
DIBuilder.h [codeview] Add DISubprogram::ThisAdjustment 2016-07-01 02:41:21 +00:00
Dominators.h Allow BasicBlockEdge to be used in DenseMap 2016-07-11 04:37:53 +00:00
Function.h Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
GetElementPtrTypeIterator.h [opaque pointer types] [NFC] gep_type_{begin,end} now take source element type and address space. 2016-01-22 01:33:43 +00:00
GlobalAlias.h [GlobalDCE, Misc] Don't remove functions referenced by ifuncs 2016-05-04 00:20:48 +00:00
GlobalIFunc.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
GlobalIndirectSymbol.h [GlobalDCE, Misc] Don't remove functions referenced by ifuncs 2016-05-04 00:20:48 +00:00
GlobalObject.h IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
GlobalValue.h IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
GlobalVariable.h IR: Call dropAllReferences from GlobalVariable's destructor. 2016-06-08 00:13:39 +00:00
GVMaterializer.h [ThinLTO] Remove post-pass metadata linking support 2016-03-29 18:24:19 +00:00
InlineAsm.h AMDGPU: Add convergent flag to INLINEASM instruction. 2016-06-22 18:51:08 +00:00
InstIterator.h IR: Create SymbolTableList wrapper around iplist, NFC 2015-10-07 20:05:10 +00:00
InstrTypes.h [InstCombine] Simplify and correct folding fcmps with the same children 2016-06-29 20:10:17 +00:00
Instruction.def [IR] Remove terminatepad 2015-12-14 18:34:23 +00:00
Instruction.h [AliasAnalysis] Give back AA results for fence instructions 2016-07-15 17:19:24 +00:00
Instructions.h Add getReturnedArgOperand to Call/InvokeInst, CallSite 2016-07-10 23:01:32 +00:00
InstVisitor.h [IR] Remove terminatepad 2015-12-14 18:34:23 +00:00
IntrinsicInst.h [NFC] Remove some dead code: 2016-05-11 16:38:40 +00:00
Intrinsics.h Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
Intrinsics.td Add a 'Returned' intrinsic property corresponding to the 'returned' argument attribute 2016-07-11 01:28:42 +00:00
IntrinsicsAArch64.td IR: Set TargetPrefix for some X86 and AArch64 intrinsics where it was missing 2016-07-01 22:07:11 +00:00
IntrinsicsAMDGPU.td AMDGPU: Add LLVM IR Intrinsic for v_lerp_u8 2016-07-12 18:02:14 +00:00
IntrinsicsARM.td [ARM] Add support for mrrc/mrrc2 intrinsics. 2016-06-17 00:52:41 +00:00
IntrinsicsBPF.td
IntrinsicsHexagon.td [Hexagon] Handle operand type differences for A2_tfrpi 2016-05-05 15:29:47 +00:00
IntrinsicsMips.td Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly 2016-04-21 17:48:02 +00:00
IntrinsicsNVVM.td IR: Set a TargetPrefix for nvvm intrinsics 2016-07-08 17:25:18 +00:00
IntrinsicsPowerPC.td Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly 2016-04-21 17:48:02 +00:00
IntrinsicsSystemZ.td [SystemZ] Utilize Test Data Class instructions. 2016-07-10 14:41:22 +00:00
IntrinsicsWebAssembly.td [WebAssembly] Rename memory_size intrinsic to current_memory 2016-05-02 17:25:22 +00:00
IntrinsicsX86.td [AVX512] Remove masked logic op intrinsics and autoupgrade them to native IR. 2016-07-12 05:27:53 +00:00
IntrinsicsXCore.td
IRBuilder.h Support arbitrary addrspace pointers in masked load/store intrinsics 2016-06-28 18:27:25 +00:00
IRPrintingPasses.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
LegacyPassManager.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LegacyPassManagers.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LegacyPassNameParser.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LLVMContext.h [OptRemark,LDist] RFC: Add hotness attribute 2016-07-15 17:23:20 +00:00
Mangler.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
MDBuilder.h add unpredictable metadata type for control flow 2015-09-02 19:06:43 +00:00
Metadata.def BitcodeReader: Avoid referencing unresolved nodes from distinct ones 2016-04-23 04:15:56 +00:00
Metadata.h BitcodeReader: Avoid referencing unresolved nodes from distinct ones 2016-04-23 04:15:56 +00:00
Module.h IR: Introduce Module::global_objects(). 2016-06-22 20:29:42 +00:00
ModuleSlotTracker.h IR: Avoid mallocs in constructor of ModuleSlotTracker 2016-04-20 19:05:59 +00:00
ModuleSummaryIndex.h [ThinLTO] Change ODR resolution and internalization to be index-based 2016-05-24 17:24:25 +00:00
NoFolder.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
OperandTraits.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Operator.h [EarlyCSE] Take the intersection of flags on instructions 2016-04-22 06:37:45 +00:00
OptBisect.h Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
PassManager.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
PassManagerInternal.h [PM] Run clang-format over various parts of the new pass manager code 2016-06-17 07:15:29 +00:00
PatternMatch.h Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B. 2016-04-21 00:53:14 +00:00
PredIteratorCache.h
ProfileSummary.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Statepoint.h Minor comment cleanup [NFC] 2016-04-21 16:15:19 +00:00
SymbolTableListTraits.h [GCC] Attribute ifunc support in llvm 2016-04-07 12:32:19 +00:00
TrackingMDRef.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
Type.h fix documentation comments; NFC 2016-06-02 20:37:52 +00:00
TypeBuilder.h
TypeFinder.h Make more headers self-contained. 2016-01-27 18:03:37 +00:00
Use.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
UseListOrder.h Add missing includes. 2016-06-28 12:17:05 +00:00
User.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
Value.def [GCC] Attribute ifunc support in llvm 2016-04-07 12:32:19 +00:00
Value.h Remove Value::isPointerDereferenceable; NFCI 2016-06-02 00:52:48 +00:00
ValueHandle.h Update/correct comment. 2015-08-03 22:33:50 +00:00
ValueMap.h Linker: Avoid constructing ValueMap::MDMapT 2016-04-19 16:57:24 +00:00
ValueSymbolTable.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
Verifier.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00