1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/include/llvm
Reid Kleckner d972bf8fab [IR] Switch AttributeList to use an array for O(1) access
Summary:
Before this change, AttributeLists stored a pair of index and
AttributeSet. This is memory efficient if most arguments do not have
attributes. However, it requires doing a search over the pairs to test
an argument or function attribute. Profiling shows that this loop was
0.76% of the time in 'opt -O2' of sqlite3.c, because LLVM constantly
tests values for nullability.

This was worth about 2.5% of mid-level optimization cycles on the
sqlite3 amalgamation. Here are the full perf results:
https://reviews.llvm.org/P7995

Here are just the before and after cycle counts:
```
$ perf stat -r 5 ./opt_before -O2 sqlite3.bc -o /dev/null
    13,274,181,184      cycles                    #    3.047 GHz                      ( +-  0.28% )
$ perf stat -r 5 ./opt_after -O2 sqlite3.bc -o /dev/null
    12,906,927,263      cycles                    #    3.043 GHz                      ( +-  0.51% )
```

This patch *does not* change the indices used to query attributes, as
requested by reviewers. Tracking whether an index is usable for array
indexing is a huge pain that affects many of the internal APIs, so it
would be good to come back later and do a cleanup to remove this
internal adjustment.

Reviewers: pete, chandlerc

Subscribers: javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D32819

llvm-svn: 303654
2017-05-23 17:01:48 +00:00
..
ADT SmallPtrSetImpl/SmallPtrSet: Add a public value_type and key_type 2017-05-21 23:41:51 +00:00
Analysis [InstSimplify] Fix the indentation throughout the interface header file. 2017-05-22 23:50:40 +00:00
AsmParser
Bitcode Remove ignore-empty-index-file option 2017-05-12 19:32:11 +00:00
CodeGen Don't generate line&scope debug info for meta-instructions. 2017-05-22 20:47:09 +00:00
Config Allow suppressing host and target info in VersionPrinter 2017-04-19 00:03:36 +00:00
DebugInfo Revert "Make TypeSerializer's StringMap use the same allocator." 2017-05-23 15:50:37 +00:00
Demangle
ExecutionEngine [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
IR [IR] Switch AttributeList to use an array for O(1) access 2017-05-23 17:01:48 +00:00
IRReader
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO Infer relocation model from module flags in relocatable LTO link. 2017-05-22 21:11:35 +00:00
MC Re-apply r302416: [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-22 09:42:07 +00:00
Object COFF: migrate def parser from LLD to LLVM [1/2] 2017-05-20 19:56:29 +00:00
ObjectYAML [WebAssembly] Fix build error in wasm YAML code 2017-05-10 00:14:04 +00:00
Option Work around MSVC rejects-valid bug related to C++11 narrowing conversions. 2017-04-13 00:14:39 +00:00
Passes
ProfileData Change sample profile writer to make it deterministic. 2017-05-11 23:43:44 +00:00
Support Add functionality to cvtres to parse all entries in res file. 2017-05-20 01:49:19 +00:00
TableGen [tblgen] GCC/MS builtin to target intrisics map. 2017-04-19 19:14:20 +00:00
Target Revert r303259 - [globalisel][tablegen] Import rules containing intrinsic_wo_chain. 2017-05-22 10:14:33 +00:00
ToolDrivers/llvm-lib Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00
Transforms [JumpThreading] Safely replace uses of condition 2017-05-23 13:36:25 +00:00
XRay [XRay][tools] Add option to llvm-xray extract to symbolize functions 2017-04-18 23:23:54 +00:00
CMakeLists.txt Support: Add a VCSRevision.h header file. 2017-04-13 01:26:12 +00:00
InitializePasses.h Revert r302938 "Add LiveRangeShrink pass to shrink live range within BB." 2017-05-18 18:50:05 +00:00
LinkAllIR.h
LinkAllPasses.h [X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option. 2017-05-15 11:30:54 +00:00
module.modulemap Modules: fix modules build. 2017-05-11 14:51:43 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
PassRegistry.h
PassSupport.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00