Commit Graph

109 Commits

Author SHA1 Message Date
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Zhou Sheng
843f0767ac Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36261 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-19 05:39:12 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
a77600e861 Switch some std::vector's to SmallVectors. This speeds up -load-vn -gcse
by 6% on tramp3d.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34167 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 22:15:31 +00:00
Chris Lattner
fd1ad3b730 modify CheckGEPInstructions to take a pointer and size instead of a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34166 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 22:12:53 +00:00
Chris Lattner
829621c59e eliminate use of TargetData::getIndexedOffset that takes a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:35:22 +00:00
Reid Spencer
d7d83db5f2 Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
LLVM's footprint and speed up linking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33941 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:42:17 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Chris Lattner
241607d016 fit to 80 cols.
Remove now-extraneous checks for ptr->ptr bitcasts.

Fix PR1109 and Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll.  We
need to consider arbitrary sized objects when checking for nested GEP offsets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33195 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 05:57:53 +00:00
Chris Lattner
0bb38313ae GEP operands can't be bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:20:48 +00:00
Reid Spencer
579dca12c2 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 04:24:46 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Reid Spencer
c5b206b6be For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int   -> Int32
4. [U]Long  -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
   and other methods related to signedness. In a few places this warranted
   identifying the signedness information from other sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:48:39 +00:00
Reid Spencer
e4d87aa2de For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Reid Spencer
d977d8651a Replace inferred getCast(V,Ty) calls with more strict variants.
Rename getZeroExtend and getSignExtend to getZExt and getSExt to match
the the casting mnemonics in the rest of LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32514 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:36:14 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Bill Wendling
a5b31ca856 Convert to using llvm streams instead of iostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:33:06 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Chris Lattner
c2e6801cc7 remove redundant code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 01:10:12 +00:00
Chris Lattner
7765d71304 Fix BasicAA/2006-11-03-BasicAAVectorCrash.ll by handling out-of-range
vector accesses like we handle out-of-range array accesses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31427 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 21:58:48 +00:00
Reid Spencer
3ed469ccd7 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Chris Lattner
90aa839c88 Fix more static dtor issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 21:52:35 +00:00
Chris Lattner
a5370172b6 simplify AnalysisGroup registration, eliminating one typeid call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29932 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 00:42:29 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Chris Lattner
a4f0b3a084 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 12:54:02 +00:00
Chris Lattner
9525528a7d Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28975 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 23:17:24 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Chris Lattner
cad25379d3 Use autogenerated mod/ref info for intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:31:29 +00:00
Chris Lattner
2cfdd2854c Fix a crash compiling Obsequi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 21:48:01 +00:00
Chris Lattner
5a3cf8de5d Be more conservative with our symbolic alias analysis. In particular,
don't assume that A[1][0] and A[0][i] can't alias.  "i" might be out of
range, or even negative.  This fixes a miscompilation of 188.ammp (which
does bad pointer tricks) with the new CFE.

Testcase here: Analysis/BasicAA/2006-03-03-BadArraySubscript.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26515 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 02:06:34 +00:00
Nate Begeman
6fb3bd6a65 Add bswap intrinsics as documented in the Language Reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:25:24 +00:00
Andrew Lenharth
f6947c1bb8 prevent cse of readcyclecounter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 19:02:54 +00:00
Andrew Lenharth
51b8d54922 continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:47:30 +00:00
Chris Lattner
ab466d769a floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
in mesa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-24 16:58:56 +00:00
Andrew Lenharth
d3513e026b Remove glibc specific functions, and mark a couple as C99
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22384 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 20:35:20 +00:00
Andrew Lenharth
d9793e6c0a because on alpha:
#   define errno (*__errno_location ())

*shakes head


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22383 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 17:41:12 +00:00
Chris Lattner
42e3c81c5f By definition, 'tail' calls cannot access the stack frame of their caller.
Expose this as a simple form of mod/ref information.  This implements
BasicAA/tailcall-modref.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21796 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-08 23:58:12 +00:00
Chris Lattner
998fffdda1 These intrinsics do not access memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21718 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:21:04 +00:00
Chris Lattner
eed37bad01 Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-30 03:44:07 +00:00
Chris Lattner
5b103c20e3 These functions can set errno!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21609 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-28 21:52:31 +00:00
Misha Brukman
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +00:00
Chris Lattner
50bc9ef507 Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
that Alkis found with Java, thanks Alkis!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20531 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 16:29:52 +00:00
Jeff Cohen
534927d82d Add even more missing createXxxPass functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:01:16 +00:00
Chris Lattner
5226f6a901 Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 17:13:24 +00:00
Chris Lattner
0af024c5d0 Adjust to new alias analysis interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:22:13 +00:00
Alkis Evlogimenos
c49741d047 Add testcase and fix for yet another case where we query the size an
abstract type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 23:56:15 +00:00
Alkis Evlogimenos
a95cf3024b Add testcase and fix for another case where we query the size an
abstract type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 23:42:11 +00:00