Commit Graph

2221 Commits

Author SHA1 Message Date
Chris Lattner
bac27a49b1 Add new api for basic signal handling for tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2302 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 19:53:53 +00:00
Chris Lattner
922a392565 New api for signal handling for LLVM tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 19:53:34 +00:00
Chris Lattner
68d892dc0d Move asmwriter/getStrValue cruft into AsmWriter.cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2300 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:53:33 +00:00
Chris Lattner
66e810be9f Pull all of the getStrValue implementation cruft out of Constants.cpp and
put it into the AsmWriter.  This code is kinda gross and could probably be
cleaned up, but not now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2299 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:53:13 +00:00
Chris Lattner
0154505ab7 Add a fixme so that we don't forget this is broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2298 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:52:03 +00:00
Chris Lattner
10586abe9a Remove getStrValue method from Constant implementations. The AssemblyWriter
now knows how to write out a constant, not the constants themselves.  This is
fixed due to the move of the AsmWriter to the VMcore library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2297 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:51:39 +00:00
Chris Lattner
4b1de8eb99 * getAsString requires that the input array is string compatible, so
assert it.
* Use WriteAsOperand instead of getStringValue for constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2296 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:15:38 +00:00
Chris Lattner
ccc259635a Make debugging code not use getStrValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2295 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:56 +00:00
Chris Lattner
6228106e9f Just use << isntead of forcing getStrValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2294 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:40 +00:00
Chris Lattner
595d2f670a Print argument scalars as ellipses instead of boxes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2293 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:19 +00:00
Chris Lattner
dd841aeb8d Significantly rework InstructionCombining to work better and to be cleaner.
We now use an InstVisitor to delegate to different cases that we are
interested in handling.  We also fix the FIXME's by adding users to the
worklist when appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2292 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 17:39:14 +00:00
Chris Lattner
fe053c77c1 New testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2291 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 17:35:39 +00:00
Chris Lattner
0e743b8397 * Add a comment to the header giving a breif overview of how to return a
value from a visit function
* Define a (file local) DELEGATE macro to make the code easier to read/maintain
* Define per-opcode delegation functions so that users can override specific
  instances of BinaryOperator for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2290 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 16:16:16 +00:00
Chris Lattner
536fe85d6d * Make dtor virtual
* Add a new defaulted argument that allows the instruction visitation
  visitors to return a non-void value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2289 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 15:46:40 +00:00
Chris Lattner
dce153e112 Check in the first test: make sure getelementptr gets folded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2288 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 15:39:50 +00:00
Chris Lattner
88f2501eda Test the instruction combiner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2287 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 15:39:15 +00:00
Chris Lattner
2a632551a7 Convert SCCP over to use InstVisitor instead of hand crafted switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2286 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 15:13:15 +00:00
Chris Lattner
d59b0af98b Remove gep::isStructSelector
CTor's do not allow names anymore for StoreInst objects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2285 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:44:53 +00:00
Chris Lattner
6428a27ee3 GEP instructions can never be constant propogated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2284 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:44:13 +00:00
Chris Lattner
27e3420ce9 Store instructions always return void, so they never get a name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2283 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:43:54 +00:00
Chris Lattner
3b87167ac4 Correctly transform dependant arguments, allowing the perimeter bm to work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:43:30 +00:00
Chris Lattner
8beec9da6c * StoreInst's shouldn't take names (they are _always_ void type)
* Remove two methods that are not used


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2281 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:42:27 +00:00
Chris Lattner
2012d5e33f Fix a bug printing out %c formated characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2277 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 17:43:01 +00:00
Chris Lattner
ef35ff066c Inline indirect function calls that are only capable of calling one function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2275 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:42:51 +00:00
Chris Lattner
fe14568a81 Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes

This fixes em3d to be _correct_ if not optimial


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2274 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:24:59 +00:00
Chris Lattner
a146183c21 Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2273 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:24:47 +00:00
Chris Lattner
4a94a70250 Add casts for documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2272 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 22:10:52 +00:00
Chris Lattner
169bffe28a * Clean up the code a bit
* Allow structs with negative offsets.  This enables the em3d benchmark to
  be made typesafe.  In this case, the struct had an array as the first
  element, so a negative index was ok (the expr was -8 + 8x)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2271 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 22:10:36 +00:00
Chris Lattner
f759c4e2a7 Remove old frivolous uses of getStrValue in a debugging statement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2270 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 21:36:59 +00:00
Chris Lattner
a3b63668d4 Remove unneccesary cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2269 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 21:36:29 +00:00
Chris Lattner
7a716added Changes to:
* Fix bug printing method types (oops when converting previous code)
* Move some of the code from Constant::getStrValue implementations here.
  This allows us to do a MUCH MUCH better job printing out complex constant
  values (think an array of structure pointers), because we print symbolic
  type names instead of structural.  The assistance when debugging is immense

Eventually, Constant::getStrValue should be removed (it existed before because
the asmwriter file was not in VMCore), and everyone should go through the
asmwriter that want's equivalent functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2268 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 21:36:08 +00:00
Chris Lattner
0ed4833986 Fix for buggy test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2267 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 21:31:08 +00:00
Chris Lattner
7650b94c75 * Remove the concept of a critical shadow node
* Make the function pointer argument explicit for a call nodes
* Eliminate unreachable global values
* Merge call nodes that are identical


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2266 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 20:39:59 +00:00
Chris Lattner
28c238636e Remove the concept of a critical shadow node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 20:39:23 +00:00
Chris Lattner
7523a107d9 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2262 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 05:58:24 +00:00
Chris Lattner
61b064759d New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 05:44:56 +00:00
Chris Lattner
212be2e569 * Eliminate ArgDSNode's completely, now rely on scalar map
* Fold call nodes that are indistinguishable for each other.  This is a big
  win for external functions like sqrt, which would multiply dramatically
  before.
* Global nodes with no edges to or from them are now eliminated from the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2257 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 03:44:03 +00:00
Chris Lattner
da022cd143 * Eliminate ArgDSNode's completely, rely now on Scalar map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2256 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 03:41:22 +00:00
Chris Lattner
09b9212b6e run an extra pass after a function has been transformed to eliminate
obviously duplicate loads of the pool base.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 22:42:23 +00:00
Chris Lattner
e4a94f2b0f Only print debug message if DEBUG_RA is on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2254 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 22:41:48 +00:00
Chris Lattner
167b9629e1 Only emit message if DEBUG_RA is on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 20:36:15 +00:00
Chris Lattner
8d70cd9607 Eliminate cast of same type instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 19:45:29 +00:00
Chris Lattner
7296e93f08 * s/Method/Function
* Add/allow callbacks for module,function, & basic block visiting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 19:32:36 +00:00
Chris Lattner
b42b7f921a Checkin first unit testcases for the backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2249 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:23:00 +00:00
Chris Lattner
649f5dd77a * s/Method/Function
* Fix bug where the character after a % was being discarded


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2248 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:15:24 +00:00
Chris Lattner
3e0e520728 Turn off debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2247 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:14:41 +00:00
Chris Lattner
dd4144a587 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:14:15 +00:00
Chris Lattner
7faa883665 Update documentation a LOT, make it more accurate and match current model
better.  Still more room for improvement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2245 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:13:44 +00:00
Chris Lattner
441d25a9f6 * Allow datasize to be specified on the commandline
* Build new datatypes correctly
* Transform instructions that return null pointers from functions to return
  a null index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2244 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 23:13:18 +00:00
Chris Lattner
ea24924732 * Fix bug: test/Regression/Verifier/2002-04-13-RetTypes.ll
* Check that arguments match the method types of the method they live in


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2243 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 22:48:46 +00:00