llvm-project/llvm
Dan Gohman eb6be650ce Teach IndVarSimplify to optimize code using the C "int" type for
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.

Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.

This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.

Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.

llvm-svn: 64407
2009-02-12 22:19:27 +00:00
..
Xcode Remove Stacker.html from Xcode project. 2008-10-14 23:23:59 +00:00
autoconf Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't 2009-02-04 06:26:47 +00:00
bindings Rename getABITypeSize to getTypePaddedSize, as 2009-01-12 20:38:59 +00:00
cmake CMake: Tests PERL availability with PERL_EXECUTABLE variable. 2009-01-22 01:20:31 +00:00
docs Edit description of floating point constants to 2009-02-11 22:14:51 +00:00
examples reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
include Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
lib Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
projects Add "sample" documentation to sample project. 2008-09-15 05:31:29 +00:00
runtime
test Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
tools Rename bugpoint's error message file so that if it somehow 2009-02-12 20:53:27 +00:00
unittests Fix comment. 2009-02-09 12:31:40 +00:00
utils Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable 2009-02-12 08:02:35 +00:00
website
win32 Update hand-crafted VC++ build. 2009-02-02 19:22:02 +00:00
CMakeLists.txt Enable PACKAGE_VERSION in cmake builds, this unbreaks the clang build with cmake. 2009-01-28 17:49:03 +00:00
CREDITS.TXT Adding your's truly to CREDITS.TXT 2009-01-19 15:04:29 +00:00
LICENSE.TXT Renamed Google Test license file from COPYING to LICENSE.TXT to match LLVM 2009-01-05 17:42:15 +00:00
Makefile Add targets to support the installation of clang in isolation. 2009-01-19 19:48:23 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't 2009-02-04 06:26:47 +00:00
Makefile.rules Reapply 63765. Patches for clang and llvm-gcc to follow. 2009-02-05 01:49:45 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt Remove extra lines 2008-07-28 20:50:25 +00:00
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
configure Regenerate. 2009-02-04 06:27:44 +00:00
llvm.spec.in

README.txt

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 HTML documentation provided in docs/index.html for further
assistance with LLVM.