Commit Graph

82 Commits

Author SHA1 Message Date
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
Reid Spencer
4a7ebfa411 For PR387:\
Add getModRefInfo method to avoid overloaded virtuals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 08:11:24 +00:00
Chris Lattner
eaf8f9c667 Fix DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18308 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-28 20:30:15 +00:00
Chris Lattner
4e61676b56 The trick with globals actually works with allocas and malloc too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18262 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-26 20:01:48 +00:00
Chris Lattner
0a1ac907c3 A store or load cannot alias a global if the accessed amount is larger then
the global.

This implements Regression/Analysis/BasicAA/global-size.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18261 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-26 19:20:01 +00:00
Chris Lattner
bc2a99b480 Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll
by saying what we mean


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-17 17:39:39 +00:00
Chris Lattner
a35339dfb6 Be more careful about looking for constants when we really want constantint's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 16:07:10 +00:00
Alkis Evlogimenos
20aa474f8f Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:19:51 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Chris Lattner
730b1ad2c4 Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
This also fixes the miscompilation of MallocBench/gs with dead store
elimination enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15324 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 07:56:39 +00:00
Chris Lattner
db5b80a7f2 Make basicaa a bit more aggressive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:18:52 +00:00
Chris Lattner
e181b94309 basic-aa can actually provide simple mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15251 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:13:55 +00:00
Chris Lattner
05e47987ee This was implemented back in march
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15250 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 01:59:42 +00:00
Chris Lattner
bb8f43c8fc Do not ignore casts unless they are pointer-pointer casts. This caused us
to miscompile the SingleSource/Regression/C++/pointer_member.cpp program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15062 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:56:54 +00:00
Reid Spencer
e840434755 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:18:30 +00:00
Chris Lattner
f70770abd5 Simplify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 20:27:12 +00:00
Chris Lattner
689835a2d9 Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
This is a regression from 1.2, though noone uses -no-aa anyway


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14245 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 08:05:58 +00:00
Chris Lattner
4ee623de0b isnan is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:52:58 +00:00
Chris Lattner
9f35196fc2 llvm.isnan doesn't access memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14151 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 06:17:13 +00:00
Chris Lattner
b52f440860 Move the -no-aa AA implementation into this file since both of these
alias analysis implementations are special: they do not autoforward to a
chained implementation of alias analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13683 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:15:12 +00:00
Chris Lattner
7512c08bfd Hrm, operator new and new[] do not belong here. We should not CSE them! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12859 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 05:16:42 +00:00
Chris Lattner
bec63d606f operator new & operator new[] do not kill any legal memory locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 18:16:34 +00:00
Chris Lattner
65585aa3fc Allow clients to be more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12831 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 16:43:07 +00:00
Chris Lattner
b903fc5c1b Add a couple of more functions that cannot access memory (the intrinsics) and
don't write to memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12808 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 06:55:27 +00:00
Chris Lattner
28977af72a Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 01:30:19 +00:00
Chris Lattner
002be76733 Add some missing functions. Make sure to handle calls together in case the
client has another VN implementation that can VN calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12427 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 03:41:35 +00:00
Chris Lattner
bbcc147220 Fix a minor bug, implementing GCSE/call_pure_function.ll
Also, add some stuff I missed before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12417 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:18:28 +00:00
Chris Lattner
4244bb5bbd Teach basicaa about some stdc functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12408 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 03:36:49 +00:00