Commit Graph

3865 Commits

Author SHA1 Message Date
Chris Lattner
47dd0c343c Test "external" modifier on global variable
Fix getelementptr instruction to use long isntead of uint index


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4047 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:32:38 +00:00
Chris Lattner
ac8a58d500 - Add new isExternal() method to GlobalVariable to mirror Function.
- doxygenize comments and add new comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4046 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:29:58 +00:00
Chris Lattner
7d3f8671c1 - The extract tool now is sure to extract the function implementation for
the specified name instead of extracting the prototype if both exist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4045 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:30:04 +00:00
Chris Lattner
f6ffcb6b71 PHI nodes are not allowed to exist with zero incoming values, check that
there aren't any like this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:00:31 +00:00
Vikram S. Adve
2a408f06b5 Bug fix: In preventing static global variables from being printed twice,
I also prevented external globals from being printed twice, but they
should (extern declaration and definition).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-05 23:43:10 +00:00
Anand Shukla
3400837374 Added #include<unistd.h> to compile with solaris gcc3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4042 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:57:01 +00:00
Anand Shukla
c1d4d79d93 added cast to unsigned to compile with gcc3.2 (sparc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4041 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:56:18 +00:00
Chris Lattner
41a29f2b6f New testcase for bug never checked into CVS, but that I hit during debugging a
new feature


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4039 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:29:40 +00:00
Chris Lattner
7d821db958 Handle post dominance correctly in the case where blocks do not have a path to
the exit node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4038 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:50:20 +00:00
Chris Lattner
4e4caeffbd Fix a nasty problem with dominance calculation for unreachable blocks.
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable".  This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:45:48 +00:00
Chris Lattner
a00397e1ee Prune function nodes that are no longer referenced due to inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4036 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:28 +00:00
Chris Lattner
6727ec64e8 sgefa uses truely huge data structures nodes. Only print part of them if they
are so big


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:13 +00:00
Chris Lattner
b0d0f5b473 The wall clock timer (implementing using the RTC or cycle counter on x86) is
so much more accurate than the per process timers that we get better results
(less noise) by sorting according to wall time than process time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4034 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:08:20 +00:00
Chris Lattner
62d928eac1 Handle bug exposed by power benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:06:38 +00:00
Nick Hildenbrandt
d2eb386c16 Add parens around constant calls to getelemptr to properly associate the reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4032 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:47:24 +00:00
Chris Lattner
55c1058135 Reimplement/port the Bottom Up Closure pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4031 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:38:41 +00:00
Chris Lattner
24b7799a10 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4030 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:06:33 +00:00
Chris Lattner
c5f21de2bc DataStructure.h doesn't include DSGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:38 +00:00
Chris Lattner
0d0244d06a Remove commented out stuff
DataStructure.h doesn't include DSGraph.h now


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4028 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:17 +00:00
Chris Lattner
60a398ed0f Move GlobalDSGraph class defn to the end of the file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4027 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:55:52 +00:00
Chris Lattner
e5346ec9ed This file doesn't need Pass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4026 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:55:24 +00:00
Nick Hildenbrandt
ca626922bc I was wrong on the removing of those references on the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4023 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:14:33 +00:00
Chris Lattner
005cbce20e * Implement the getc() function
* Support usage of stdin, stdout & stderr correctly in LLI!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:12:13 +00:00
Chris Lattner
849735ce22 Cleanup #includes, expose module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:11:16 +00:00
Chris Lattner
dbaf74d108 Expose TD to ExternalFunctions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:10:48 +00:00
Chris Lattner
061269be97 - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 19:38:55 +00:00
Chris Lattner
b6984558c5 Fix bug: 2002-10-02-SignExtensionProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4017 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:53:14 +00:00
Nick Hildenbrandt
51c84d14ab Removed unneeded reference and dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:34:51 +00:00
Chris Lattner
87d9138f01 New testcase for a problem discovered in the SPECINT gzip benchmark.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4015 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:32:38 +00:00
Nick Hildenbrandt
275801b2dd Cleaned up my last check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4014 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:32:35 +00:00
Nick Hildenbrandt
113ad893b9 No longer include malloc.h. If protoypes are needed for memory functions they will be present in the byte code and the generated c as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:20:18 +00:00
Chris Lattner
e03f32bcc2 * Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4012 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 06:24:36 +00:00
Chris Lattner
27236ac089 * Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 06:24:29 +00:00
Chris Lattner
9cfb358fa4 When printing DS nodes, print the mergemap index as well to allow easier
debugging of merging process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 05:17:55 +00:00
Chris Lattner
8b719877b1 Checkin the "meat" of the Data structure graph itself. I forgot to check
this in before.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 04:58:12 +00:00
Chris Lattner
7b7200c4ea * Significant rework of DSNode to support arbitrary aliasing due to merging
* Now all and any bytes of a DSNode can be merged together individually.  This
  is neccesary to support the full generality of C and support aliasing
  correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 04:57:39 +00:00
Chris Lattner
1da2972d26 - Remove the User::eraseOperand method which is never used, really
dangerous, and not something we want to expose.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4007 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 23:41:17 +00:00
Chris Lattner
c75ff9ac19 Do some cleanups to the Type and Constant section to remove latex stuff
There is still a lot of cleanup and fleshing out required here, but at least
it gets rid of the flagrantly bad parts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4006 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 23:17:09 +00:00
Chris Lattner
d2f86e7ce6 Temporary change to make datastructure stuff link in right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4005 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:41:01 +00:00
Chris Lattner
e68bf61f6f Changes to work with Statistics rework
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4004 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:40:31 +00:00
Chris Lattner
8328f1d9a6 Update manual to reflect recent changes in the Statistic class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4003 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:39:41 +00:00
Chris Lattner
a92f696b74 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:38:41 +00:00
Chris Lattner
6ee6bbeb04 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:38:37 +00:00
Chris Lattner
249be915df Build subdirs in parallel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4000 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:36:35 +00:00
Chris Lattner
96ef1b90c8 - Rework Statistics:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3999 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:35:45 +00:00
Chris Lattner
11aec6cc7d Check in DataStructure rewrite so far.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3998 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:34:45 +00:00
Chris Lattner
1c7ce2c7fe Initial checkin of Steensgaards context insensitive flow insensitive
alias analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:34:12 +00:00
Chris Lattner
fccd06fcea Checkin some major reworks of data structure analysis. This is not done,
nor does it work very well, but I need to get it checked in before I break
the tree unintentionally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:33:50 +00:00
Chris Lattner
57b062a8cc Make sure to use the TimerGroup that we created!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:12:06 +00:00
Chris Lattner
ccc7bef873 Make sure not to count the PassManager wrapers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:08:11 +00:00