LLVM backend for 6502
Go to file
Meador Inge 67cb638629 LibCallSimplifier: optimize speed for short-lived instances
Nadav reported a performance regression due to the work I did to
merge the library call simplifier into instcombine [1].  The issue
is that a new LibCallSimplifier object is being created whenever
InstCombiner::runOnFunction is called.  Every time a LibCallSimplifier
object is used to optimize a call it creates a hash table to map from
a function name to an object that optimizes functions of that name.
For short-lived LibCallSimplifier instances this is quite inefficient.
Especially for cases where no calls are actually simplified.

This patch fixes the issue by dropping the hash table and implementing
an explicit lookup function to correlate the function name to the object
that optimizes functions of that name.  This avoids the cost of always
building and destroying the hash table in cases where the LibCallSimplifier
object is short-lived and avoids the cost of building the table when no
simplifications are actually preformed.

On a benchmark containing 100,000 calls where none of them are simplified
I noticed a 30% speedup.  On a benchmark containing 100,000 calls where
all of them are simplified I noticed an 8% speedup.

[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176840 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 00:08:29 +00:00
autoconf configure: remove workaround for gcc's -Wno-maybe-uninitialized 2013-02-13 21:19:39 +00:00
bindings [python] Add markup option to disassembler 2012-12-01 21:57:30 +00:00
cmake CMake: Always include the CheckCXXCompilerFlag in HandleLLVMOptions.cmake. 2013-03-02 01:00:40 +00:00
docs Missing period in doc 2013-03-11 16:51:15 +00:00
examples Update links to "Itanium C++ ABI: Exception Handling" document 2013-01-13 15:53:09 +00:00
include Remove support for versioned debug info. 2013-03-11 23:39:23 +00:00
lib LibCallSimplifier: optimize speed for short-lived instances 2013-03-12 00:08:29 +00:00
projects Print a warning message if compiler-rt can't be built because of old CMake version to make this requirement more visible to users 2013-03-05 14:43:07 +00:00
runtime Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and 2013-03-07 02:03:08 +00:00
test llvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts. 2013-03-11 23:16:30 +00:00
tools Connect LLVM CMake build scripts to LLDB's CMake scripts: 2013-02-28 23:15:15 +00:00
unittests [Support][ErrorOr] Add support for implicit conversion from error code/condition enums. 2013-02-28 01:44:26 +00:00
utils Fixes disassembler crashes on 2013 Haswell RTM instructions. 2013-03-11 21:17:13 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Revert CMake version bump since we don't actually need 2.8.6 any more. 2013-02-18 11:53:37 +00:00
CODE_OWNERS.TXT Add myself as code owner of AArch64 backend. 2013-01-31 12:51:16 +00:00
configure configure: remove workaround for gcc's -Wno-maybe-uninitialized 2013-02-13 21:19:39 +00:00
CREDITS.TXT Fix my email address in CREDITS.TXT. 2013-03-01 22:20:03 +00:00
LICENSE.TXT Add LICENSE.TXT covering contributions made by ARM. 2013-01-07 10:04:49 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile Improved svn repo searching for 'make update' 2013-01-28 03:19:57 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Pass CPPFLAGS/CFLAGS/CXXFLAGS from the environment of configure to 2013-02-04 08:15:53 +00:00
Makefile.rules remove an ancient and quaint bit of commented out makefile goo from when 2013-03-08 01:26:10 +00:00
README.txt Revert "Test commit" 2013-02-22 19:19:41 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.