oota-llvm.git
20 years agoFix bug in bug name. It must be the painkillers that I haven't been taking
Chris Lattner [Tue, 16 Mar 2004 09:01:10 +0000 (09:01 +0000)]
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

20 years agoImplement a new feature in the CFE, moving a GCC extension from the unsupported
Chris Lattner [Tue, 16 Mar 2004 08:54:07 +0000 (08:54 +0000)]
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

20 years agoNew testcase
Chris Lattner [Tue, 16 Mar 2004 08:49:48 +0000 (08:49 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12437 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoboog fixed
Chris Lattner [Tue, 16 Mar 2004 08:40:35 +0000 (08:40 +0000)]
boog fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12436 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix PR296: [execution engines] Unhandled cast constant expression
Chris Lattner [Tue, 16 Mar 2004 08:38:56 +0000 (08:38 +0000)]
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

20 years agoFix a regression from this patch:
Chris Lattner [Tue, 16 Mar 2004 06:00:15 +0000 (06:00 +0000)]
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

20 years agoNew testcase for PR293
Chris Lattner [Tue, 16 Mar 2004 05:44:02 +0000 (05:44 +0000)]
New testcase for PR293

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12433 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed
Chris Lattner [Tue, 16 Mar 2004 05:28:35 +0000 (05:28 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12432 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agofoo Bug 291, bar PR291
Chris Lattner [Tue, 16 Mar 2004 05:18:24 +0000 (05:18 +0000)]
foo Bug 291, bar PR291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12431 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agofoo bug291 bar PR 291
Chris Lattner [Tue, 16 Mar 2004 05:17:07 +0000 (05:17 +0000)]
foo bug291  bar PR 291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12430 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPR291
Chris Lattner [Tue, 16 Mar 2004 05:16:05 +0000 (05:16 +0000)]
PR291
Bug 291!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12429 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago// Testcase from Bug 291
Chris Lattner [Tue, 16 Mar 2004 05:14:47 +0000 (05:14 +0000)]
// Testcase from Bug 291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12428 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some missing functions. Make sure to handle calls together in case the
Chris Lattner [Tue, 16 Mar 2004 03:41:35 +0000 (03:41 +0000)]
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

20 years agoFix thinko, and PR292
Chris Lattner [Tue, 16 Mar 2004 01:51:54 +0000 (01:51 +0000)]
Fix thinko, and PR292

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12426 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix PR294
Chris Lattner [Tue, 16 Mar 2004 01:45:55 +0000 (01:45 +0000)]
Fix PR294

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd LAHF instruction
Alkis Evlogimenos [Mon, 15 Mar 2004 17:20:14 +0000 (17:20 +0000)]
Add LAHF instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12424 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRestore old inlining heuristic. As the comment indicates, this is a nasty
Chris Lattner [Mon, 15 Mar 2004 06:38:14 +0000 (06:38 +0000)]
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

20 years agoOk, the assertion was bogus. Calls that do not read/write memory should not
Chris Lattner [Mon, 15 Mar 2004 06:28:07 +0000 (06:28 +0000)]
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

20 years agoThis assertion is bogus now that calls do not necessarily read/write memory
Chris Lattner [Mon, 15 Mar 2004 06:24:15 +0000 (06:24 +0000)]
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

20 years agoAdd counters for the number of calls elimianted
Chris Lattner [Mon, 15 Mar 2004 05:46:59 +0000 (05:46 +0000)]
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

20 years agoImplement CSE of call instructions in the most trivial case. This implements
Chris Lattner [Mon, 15 Mar 2004 05:44:59 +0000 (05:44 +0000)]
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

20 years agoNew testcase for CSE of call instructions
Chris Lattner [Mon, 15 Mar 2004 05:44:29 +0000 (05:44 +0000)]
New testcase for CSE of call instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12418 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a minor bug, implementing GCSE/call_pure_function.ll
Chris Lattner [Mon, 15 Mar 2004 04:18:28 +0000 (04:18 +0000)]
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

20 years agoMake sure that pure calls don't kill loads
Chris Lattner [Mon, 15 Mar 2004 04:17:53 +0000 (04:17 +0000)]
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

20 years agoImplement LICM of calls in simple cases. This is sufficient to move around
Chris Lattner [Mon, 15 Mar 2004 04:11:30 +0000 (04:11 +0000)]
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

20 years agoNew testcases to test LICM of call instructions
Chris Lattner [Mon, 15 Mar 2004 04:10:08 +0000 (04:10 +0000)]
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

20 years agoDon't be COMPLETELY pessimistic in the face of function calls
Chris Lattner [Mon, 15 Mar 2004 04:08:36 +0000 (04:08 +0000)]
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

20 years agoTweak argument
Chris Lattner [Mon, 15 Mar 2004 04:08:18 +0000 (04:08 +0000)]
Tweak argument

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12412 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDeinline a couple of methods. Improve comment.
Chris Lattner [Mon, 15 Mar 2004 04:07:59 +0000 (04:07 +0000)]
Deinline a couple of methods.  Improve comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12411 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDeinline some virtual methods, provide better mod/ref answers through the
Chris Lattner [Mon, 15 Mar 2004 04:07:29 +0000 (04:07 +0000)]
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

20 years agoPass through the boolean queries
Chris Lattner [Mon, 15 Mar 2004 04:06:46 +0000 (04:06 +0000)]
Pass through the boolean queries

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12409 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTeach basicaa about some stdc functions.
Chris Lattner [Mon, 15 Mar 2004 03:36:49 +0000 (03:36 +0000)]
Teach basicaa about some stdc functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12408 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd two new methods which can be used to enable a bunch of transformations
Chris Lattner [Mon, 15 Mar 2004 01:58:54 +0000 (01:58 +0000)]
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

20 years agoMostly cosmetic improvements. Do fix the bug where a global value was considered...
Chris Lattner [Mon, 15 Mar 2004 01:26:44 +0000 (01:26 +0000)]
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

20 years agoAssert that input blocks meet the invariants we expect
Chris Lattner [Mon, 15 Mar 2004 01:18:23 +0000 (01:18 +0000)]
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

20 years agoNew testcase that causes the code extractor to generate bogus code.
Chris Lattner [Mon, 15 Mar 2004 00:08:49 +0000 (00:08 +0000)]
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

20 years agoFix several bugs in the loop extractor. In particular, subloops were never
Chris Lattner [Mon, 15 Mar 2004 00:02:02 +0000 (00:02 +0000)]
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

20 years agoNo correctness fixes here, just minor qoi fixes:
Chris Lattner [Sun, 14 Mar 2004 23:43:24 +0000 (23:43 +0000)]
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

20 years agoSimplify code a bit, and fix bug CodeExtractor/2004-03-14-NoSwitchSupport.ll
Chris Lattner [Sun, 14 Mar 2004 23:05:49 +0000 (23:05 +0000)]
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

20 years agoSimplify the code a bit by making the collection of basic blocks to extract
Chris Lattner [Sun, 14 Mar 2004 22:34:55 +0000 (22:34 +0000)]
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

20 years agoNew testcase that crashes the loop extractor
Chris Lattner [Sun, 14 Mar 2004 22:16:52 +0000 (22:16 +0000)]
New testcase that crashes the loop extractor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12399 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAfter reducing a miscompiled program down to the functions which are being
Chris Lattner [Sun, 14 Mar 2004 22:08:00 +0000 (22:08 +0000)]
After reducing a miscompiled program down to the functions which are being
miscompiled, try to use the loop extractor to reduce the program down to a
loop nest that is being miscompiled.  In practice, the loop extractor appears
to have too many bugs for this to be useful, but hopefully they will be fixed
soon...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12398 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a minor bug in runPassesOn
Chris Lattner [Sun, 14 Mar 2004 21:37:41 +0000 (21:37 +0000)]
Fix a minor bug in runPassesOn

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12397 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a new "AutoDebugCrashes" option
Chris Lattner [Sun, 14 Mar 2004 21:21:57 +0000 (21:21 +0000)]
Add a new "AutoDebugCrashes" option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12396 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor to use a new method
Chris Lattner [Sun, 14 Mar 2004 21:17:22 +0000 (21:17 +0000)]
Refactor to use a new method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12395 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new method
Chris Lattner [Sun, 14 Mar 2004 21:17:03 +0000 (21:17 +0000)]
Add new method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12394 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor and clean up a bunch more code. No major functionality changes.
Chris Lattner [Sun, 14 Mar 2004 20:50:42 +0000 (20:50 +0000)]
Refactor and clean up a bunch more code.  No major functionality changes.
 * Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList)
 * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger
   did.  This allows code sharing.
 * Add a couple of methods to BugDriver that allows us to eliminate some friends
 * Improve comments in ExtractFunction.cpp
 * Make classes that used to be friends up bugdriver now live in anon namespaces
 * Rip a bunch of functionality in the miscompilation tester into a new
   TestMergedProgram function for future code sharing.
 * Fix a bug in the miscompilation tester induced in my last checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12393 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAnother API change to MRegisterInfo::foldMemoryOperand. Instead of a
Alkis Evlogimenos [Sun, 14 Mar 2004 20:14:27 +0000 (20:14 +0000)]
Another API change to MRegisterInfo::foldMemoryOperand. Instead of a
MachineBasicBlock::iterator take a MachineInstr*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12392 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a method to extract a loop
Chris Lattner [Sun, 14 Mar 2004 20:02:07 +0000 (20:02 +0000)]
Add a method to extract a loop

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12391 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSplit into two passes. Now there is the general loop extractor, usable on
Chris Lattner [Sun, 14 Mar 2004 20:01:36 +0000 (20:01 +0000)]
Split into two passes.  Now there is the general loop extractor, usable on
the command line, and the single loop extractor, usable by bugpoint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12390 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRename createLoopExtractorPass to createSingleLoopExtractorPass
Chris Lattner [Sun, 14 Mar 2004 20:00:37 +0000 (20:00 +0000)]
Rename createLoopExtractorPass to createSingleLoopExtractorPass
Doxygenify

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12389 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoadd a fixme
Chris Lattner [Sun, 14 Mar 2004 19:31:00 +0000 (19:31 +0000)]
add a fixme

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12388 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor all of the "splitting a module into two pieces" code to avoid
Chris Lattner [Sun, 14 Mar 2004 19:27:19 +0000 (19:27 +0000)]
Refactor all of the "splitting a module into two pieces" code to avoid
code duplication.  Also, don't use ReduceMiscompilingFunctions::TestFuncs
to print out the final message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12387 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange MRegisterInfo::foldMemoryOperand to return the folded
Alkis Evlogimenos [Sun, 14 Mar 2004 07:19:51 +0000 (07:19 +0000)]
Change MRegisterInfo::foldMemoryOperand to return the folded
instruction to make the API more flexible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12386 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPasses don't print stuff!
Chris Lattner [Sun, 14 Mar 2004 04:17:53 +0000 (04:17 +0000)]
Passes don't print stuff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12385 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDo not create empty basic blocks when the lowerswitch pass expects blocks to
Chris Lattner [Sun, 14 Mar 2004 04:14:31 +0000 (04:14 +0000)]
Do not create empty basic blocks when the lowerswitch pass expects blocks to
be non-empty!  This fixes LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12384 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase that crashes the -lowerswitch pass
Chris Lattner [Sun, 14 Mar 2004 04:13:57 +0000 (04:13 +0000)]
New testcase that crashes the -lowerswitch pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12383 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMinor random cleanups
Chris Lattner [Sun, 14 Mar 2004 04:01:47 +0000 (04:01 +0000)]
Minor random cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12382 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFunctionPass's should not define their own 'run' method.
Chris Lattner [Sun, 14 Mar 2004 04:01:06 +0000 (04:01 +0000)]
FunctionPass's should not define their own 'run' method.
Require 'simplified' loops, not just raw natural loops.  This fixes
CodeExtractor/2004-03-13-LoopExtractorCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12381 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIf a block is dead, dominators will not be calculated for it. Because of this
Chris Lattner [Sun, 14 Mar 2004 03:59:22 +0000 (03:59 +0000)]
If a block is dead, dominators will not be calculated for it.  Because of this
loop information won't see it, and we could have unreachable blocks pointing to
the non-header node of blocks in a natural loop.  This isn't tidy, so have the
loopsimplify pass clean it up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12380 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCatch some more cases of broken code. The loop extractor seems to be creating
Chris Lattner [Sun, 14 Mar 2004 03:23:54 +0000 (03:23 +0000)]
Catch some more cases of broken code.  The loop extractor seems to be creating
situations where there is a branch that goes to a block in another function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12379 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoVerify functions as they are produced if -debug is specified. Reduce
Chris Lattner [Sun, 14 Mar 2004 03:17:22 +0000 (03:17 +0000)]
Verify functions as they are produced if -debug is specified.  Reduce
curly braceage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12378 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoverifyFunction has been broken for a long time now. Fix it.
Chris Lattner [Sun, 14 Mar 2004 03:16:15 +0000 (03:16 +0000)]
verifyFunction has been broken for a long time now.  Fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12377 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase that crashes the loop extractor
Chris Lattner [Sun, 14 Mar 2004 03:03:59 +0000 (03:03 +0000)]
New testcase that crashes the loop extractor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12376 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove prototype to IPO.h instead of Scalar.h
Chris Lattner [Sun, 14 Mar 2004 02:37:16 +0000 (02:37 +0000)]
Move prototype to IPO.h instead of Scalar.h
Make sure that the file interface header (IPO.h) is included first
remove dead #incldue

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12375 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove loop extractor to the IPO header
Chris Lattner [Sun, 14 Mar 2004 02:36:34 +0000 (02:36 +0000)]
Move loop extractor to the IPO header

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12374 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIndent anon namespace properly, add copyright block
Chris Lattner [Sun, 14 Mar 2004 02:34:07 +0000 (02:34 +0000)]
Indent anon namespace properly, add copyright block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12373 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove to the IPO library. Utils shouldn't contain passes.
Chris Lattner [Sun, 14 Mar 2004 02:32:27 +0000 (02:32 +0000)]
Move to the IPO library.  Utils shouldn't contain passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12372 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove dead file
Chris Lattner [Sun, 14 Mar 2004 02:13:57 +0000 (02:13 +0000)]
Remove dead file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12371 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDemoteRegToStack got moved from DemoteRegToStack.h to Local.h
Chris Lattner [Sun, 14 Mar 2004 02:13:38 +0000 (02:13 +0000)]
DemoteRegToStack got moved from DemoteRegToStack.h to Local.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12368 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove DemoteRegToStack prototype out of DemoteRegToStack.h to this file.
Chris Lattner [Sun, 14 Mar 2004 02:13:07 +0000 (02:13 +0000)]
Move DemoteRegToStack prototype out of DemoteRegToStack.h to this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12367 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDocument stuff that is known to be broken
Chris Lattner [Sun, 14 Mar 2004 02:03:02 +0000 (02:03 +0000)]
Document stuff that is known to be broken

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12366 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some debugging output
Chris Lattner [Sat, 13 Mar 2004 23:54:27 +0000 (23:54 +0000)]
Add some debugging output
Fix InstCombine/2004-03-13-InstCombineInfLoop.ll which caused an infinite
loop compiling (I think) povray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12365 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase, distilled from povray I think.
Chris Lattner [Sat, 13 Mar 2004 23:53:04 +0000 (23:53 +0000)]
New testcase, distilled from povray I think.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12364 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis change makes two big adjustments.
Chris Lattner [Sat, 13 Mar 2004 23:15:45 +0000 (23:15 +0000)]
This change makes two big adjustments.
 * Be a lot more accurate about what the effects will be when inlining a call
   to a function when an argument is an alloca.
 * Dramatically reduce the penalty for inlining a call in a large function.
   This heuristic made it almost impossible to inline a function into a large
   function, no matter how small the callee is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12363 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis little patch speeds up the loop used to update the dominator set analysis.
Chris Lattner [Sat, 13 Mar 2004 22:01:26 +0000 (22:01 +0000)]
This little patch speeds up the loop used to update the dominator set analysis.
On the testcase from GCC PR12440, which has a LOT of loops (1392 of which require
preheaders to be inserted), this speeds up the loopsimplify pass from 1.931s to
0.1875s.  The loop in question goes from 1.65s -> 0.0097s, which isn't bad. All of
these times are a debug build.

This adds a dependency on DominatorTree analysis that was not there before, but
we always had dominatortree available anyway, because LICM requires both loop
simplify and DT, so this doesn't add any extra analysis in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12362 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTurn on argument promotion in gccas. This can give us substantially better
Chris Lattner [Sat, 13 Mar 2004 21:38:35 +0000 (21:38 +0000)]
Turn on argument promotion in gccas.  This can give us substantially better
code in cases where the file has lots of static functions or anon namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12361 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOption no more
Chris Lattner [Sat, 13 Mar 2004 19:36:30 +0000 (19:36 +0000)]
Option no more

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12360 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the "infinite looping unless you disable adce" bug
Chris Lattner [Sat, 13 Mar 2004 19:35:54 +0000 (19:35 +0000)]
Fix the "infinite looping unless you disable adce" bug
Also remove an option to disable adce :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12359 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a tiny bug that caused an incorrect assertion failure poolallocating
Chris Lattner [Sat, 13 Mar 2004 01:14:23 +0000 (01:14 +0000)]
Fix a tiny bug that caused an incorrect assertion failure poolallocating
boxed-sim.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12358 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIt helps if I save the file. :)
Chris Lattner [Sat, 13 Mar 2004 00:24:52 +0000 (00:24 +0000)]
It helps if I save the file.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12357 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Chris Lattner [Sat, 13 Mar 2004 00:24:00 +0000 (00:24 +0000)]
Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12356 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement sub.ll:test14
Chris Lattner [Sat, 13 Mar 2004 00:11:49 +0000 (00:11 +0000)]
Implement sub.ll:test14

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12355 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOh right, casts can interfere. Test this too
Chris Lattner [Sat, 13 Mar 2004 00:11:38 +0000 (00:11 +0000)]
Oh right, casts can interfere.  Test this too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12354 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement InstCombine/sub.ll:test12 & test13
Chris Lattner [Fri, 12 Mar 2004 23:53:13 +0000 (23:53 +0000)]
Implement InstCombine/sub.ll:test12 & test13

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12353 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agonew testcases
Chris Lattner [Fri, 12 Mar 2004 23:52:51 +0000 (23:52 +0000)]
new testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12352 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a couple of minor problems. Because PHI nodes can use themselves, this
Chris Lattner [Fri, 12 Mar 2004 23:12:55 +0000 (23:12 +0000)]
Fix a couple of minor problems.  Because PHI nodes can use themselves, this
could cause infinite loops.  Also, getUnderlyingObject can return null

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12351 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPerformed some updates on the new options to these command line tools.
John Criswell [Fri, 12 Mar 2004 22:45:35 +0000 (22:45 +0000)]
Performed some updates on the new options to these command line tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12350 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement mod/ref analysis for a trivial case where locals don't escape.
Chris Lattner [Fri, 12 Mar 2004 22:39:00 +0000 (22:39 +0000)]
Implement mod/ref analysis for a trivial case where locals don't escape.
This comes up when you have a local array on the stack and you never pass
the address of elements around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12349 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agonew testcase
Chris Lattner [Fri, 12 Mar 2004 22:38:31 +0000 (22:38 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12348 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRevise comment and error message for the Bug 38 situation. Also, make it
Brian Gaeke [Fri, 12 Mar 2004 21:37:46 +0000 (21:37 +0000)]
Revise comment and error message for the Bug 38 situation.  Also, make it
print out the name of the function being used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12347 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFixed grammar typo.
John Criswell [Fri, 12 Mar 2004 21:29:42 +0000 (21:29 +0000)]
Fixed grammar typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12345 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake -print-machineinstrs show us the code both before and after reg. alloc.
Brian Gaeke [Fri, 12 Mar 2004 21:19:08 +0000 (21:19 +0000)]
Make -print-machineinstrs show us the code both before and after reg. alloc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12344 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFixed grammar typo.
John Criswell [Fri, 12 Mar 2004 21:19:06 +0000 (21:19 +0000)]
Fixed grammar typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12343 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdded minor information on C++.
John Criswell [Fri, 12 Mar 2004 20:42:16 +0000 (20:42 +0000)]
Added minor information on C++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12341 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdated to LLVM 1.2.
John Criswell [Fri, 12 Mar 2004 20:31:37 +0000 (20:31 +0000)]
Updated to LLVM 1.2.
Added information on getting the LLVM GCC front end from CVS.
Added new configure script options.
Made other minor corrections and modifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12340 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix PR266: Make Module Not Inherit From Annotable
Chris Lattner [Fri, 12 Mar 2004 19:51:16 +0000 (19:51 +0000)]
Fix PR266: Make Module Not Inherit From Annotable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12339 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPoint to the new license (includes year 2004).
John Criswell [Fri, 12 Mar 2004 18:20:15 +0000 (18:20 +0000)]
Point to the new license (includes year 2004).
Changed crtend.o to libcrtend.a.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12338 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdded a header indicating that the Linux and MacOS configure procedures are
John Criswell [Fri, 12 Mar 2004 18:02:17 +0000 (18:02 +0000)]
Added a header indicating that the Linux and MacOS configure procedures are
the same.

Added LLVM copyright and warranty disclaimer information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12337 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for a wider range of CMOV instructions.
Alkis Evlogimenos [Fri, 12 Mar 2004 17:59:56 +0000 (17:59 +0000)]
Add support for a wider range of CMOV instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12336 91177308-0d34-0410-b5e6-96231b3b80d8