Commit Graph

11148 Commits

Author SHA1 Message Date
Brian Gaeke
f57e364f65 Make getClass more robust by adding cLong.
Add handling for Mul instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:11 +00:00
Chris Lattner
f303aed82f Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12449 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:55:23 +00:00
Chris Lattner
0eded5c567 New testcase for PR297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12448 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:52:24 +00:00
Brian Gaeke
e40eae7370 Add a better head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:47:20 +00:00
Chris Lattner
f580cdcc22 Bug not fixed after all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12446 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:39:04 +00:00
Chris Lattner
4dcd0d18ae Fix test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12445 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:10:15 +00:00
Chris Lattner
13ebaeb278 Fix testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 20:04:55 +00:00
Chris Lattner
91408eba18 Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
testcase from 32.5s in -raise to take .3s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12443 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 19:52:53 +00:00
Chris Lattner
a2f652d420 Do not try to optimize PHI nodes with incredibly high degree. This reduces SCCP
time from 615s to 1.49s on a large testcase that has a gigantic switch statement
that all of the blocks in the function go to (an intepreter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12442 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 19:49:59 +00:00
Chris Lattner
4bebf08d15 Do not copy gigantic switch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 19:45:22 +00:00
Chris Lattner
c62db6fc40 Fix bug in bug name. It must be the painkillers that I haven't been taking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12440 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 09:01:10 +00:00
Chris Lattner
7fe97dd95e Implement a new feature in the CFE, moving a GCC extension from the unsupported
to the supported list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12439 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 08:54:07 +00:00
Chris Lattner
7698e4eb41 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12437 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 08:49:48 +00:00
Chris Lattner
bc7c0b8b95 boog fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 08:40:35 +00:00
Chris Lattner
7d1bd336ab Fix PR296: [execution engines] Unhandled cast constant expression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 08:38:56 +00:00
Chris Lattner
85ebd541fa Fix a regression from this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/013095.html

Basically, this patch only updated the immediate dominatees of the header node
to tell them that the preheader also dominated them.  In practice, ALL
dominatees of the header node are also dominated by the preheader.

This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate.
and PR293


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12434 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 06:00:15 +00:00
Chris Lattner
339c50873d New testcase for PR293
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:44:02 +00:00
Chris Lattner
26894bc347 Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:28:35 +00:00
Chris Lattner
91e49c4d72 foo Bug 291, bar PR291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12431 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:18:24 +00:00
Chris Lattner
52cac3c555 foo bug291 bar PR 291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12430 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:17:07 +00:00
Chris Lattner
ad32064a0e PR291
Bug 291!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12429 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:16:05 +00:00
Chris Lattner
a1d1fcec93 // Testcase from Bug 291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 05:14:47 +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
002dbddccd Fix thinko, and PR292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12426 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 01:51:54 +00:00
Chris Lattner
6ae9eb1566 Fix PR294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos
63dd4ff809 Add LAHF instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 17:20:14 +00:00
Chris Lattner
6dd196f762 Restore old inlining heuristic. As the comment indicates, this is a nasty
horrible hack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 06:38:14 +00:00
Chris Lattner
fcead4f426 Ok, the assertion was bogus. Calls that do not read/write memory should not
have an alias set, just like adds and subtracts don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 06:28:07 +00:00
Chris Lattner
df209fcc7e This assertion is bogus now that calls do not necessarily read/write memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12421 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 06:24:15 +00:00
Chris Lattner
46234fd97f Add counters for the number of calls elimianted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12420 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 05:46:59 +00:00
Chris Lattner
5a6e947f1d Implement CSE of call instructions in the most trivial case. This implements
GCSE/call_cse.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12419 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 05:44:59 +00:00
Chris Lattner
142c304dbb New testcase for CSE of call instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12418 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 05:44:29 +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
66d0884954 Make sure that pure calls don't kill loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:17:53 +00:00
Chris Lattner
118dd0ce3d Implement LICM of calls in simple cases. This is sufficient to move around
sin/cos/strlen calls and stuff.  This implements:
  LICM/call_sink_pure_function.ll
  LICM/call_sink_const_function.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12415 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:11:30 +00:00
Chris Lattner
65a88e83e3 New testcases to test LICM of call instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12414 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:10:08 +00:00
Chris Lattner
5b5f7c11d0 Don't be COMPLETELY pessimistic in the face of function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:08:36 +00:00
Chris Lattner
c87f0bb345 Tweak argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:08:18 +00:00
Chris Lattner
5cb66e24d4 Deinline a couple of methods. Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:07:59 +00:00
Chris Lattner
992860c44e Deinline some virtual methods, provide better mod/ref answers through the
use of the boolean queries


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12410 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:07:29 +00:00
Chris Lattner
b79d79297d Pass through the boolean queries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12409 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:06:46 +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
Chris Lattner
3e295b1b59 Add two new methods which can be used to enable a bunch of transformations
in common cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 01:58:54 +00:00
Chris Lattner
15d443b566 Mostly cosmetic improvements. Do fix the bug where a global value was considered an input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 01:26:44 +00:00
Chris Lattner
0de632bfae Assert that input blocks meet the invariants we expect
Simplify the input/output finder.  All elements of a basic block are
instructions.  Any used arguments are also inputs.  An instruction can only
be used by another instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12405 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 01:18:23 +00:00
Chris Lattner
e94fd1963d New testcase that causes the code extractor to generate bogus code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12404 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 00:08:49 +00:00
Chris Lattner
5156c39d64 Fix several bugs in the loop extractor. In particular, subloops were never
extracted, and a function that contained a single top-level loop never had
the loop extracted, regardless of how much non-loop code there was.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12403 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 00:02:02 +00:00
Chris Lattner
65826bf435 No correctness fixes here, just minor qoi fixes:
* Don't insert a branch to the switch instruction after the call, just
  make it a single block.
* Insert the new alloca instructions in the entry block of the original
  function instead of having them execute dynamically
* Don't make the default edge of the switch instruction go back to the switch.
  The loop extractor shouldn't create new loops!
* Give meaningful names to the alloca slots and the reload instructions
* Some minor code simplifications


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12402 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 23:43:24 +00:00
Chris Lattner
12f390e9c0 Simplify code a bit, and fix bug CodeExtractor/2004-03-14-NoSwitchSupport.ll
This also implements a two minor improvements:
  * Don't insert live-out stores IN the region, insert them on the code path
    that exits the region
  * If the region is exited to the same block from multiple paths, share the
    switch statement entry, live-out store code, and the basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12401 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 23:05:49 +00:00
Chris Lattner
0e06674287 Simplify the code a bit by making the collection of basic blocks to extract
a member of the class.  While we're at it, turn the collection into a set
instead of a vector to improve efficiency and make queries simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12400 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 22:34:55 +00:00