Commit Graph

7729 Commits

Author SHA1 Message Date
Chris Lattner
79f0c8e4ee Fix potential miscompilations: InstCombine/2004-09-20-BadLoadCombine*.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 10:15:10 +00:00
Alkis Evlogimenos
7b6ec600c5 Fix loop condition so that we don't decrement off the beginning of the
list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16440 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 06:42:58 +00:00
Chris Lattner
b12914bfc0 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
bba61c07dd 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

Also, fix some undefined behavior, expecting | on booleans to evaluate
left-to-right.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:47:19 +00:00
Chris Lattner
68d033cc94 Finegrainify namespacification
'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16434 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:44:31 +00:00
Chris Lattner
ded6d0c9fb Prototype more accurately
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:43:57 +00:00
Chris Lattner
4b50156049 Prototype these functions more accurately
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:43:15 +00:00
Reid Spencer
d232438f54 Put in a #error in the event that we don't have an mmap that can map a file
into memor. This is just a reminder that the ReadFileIntoAddressSpace
function needs to be properly converted to lib/System and implemented via
read/write if there's no mmap of file support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:13:43 +00:00
Chris Lattner
8a37520f80 Make isSafeToLoadUnconditionally a bit smarter, implementing PR362 and
Regression/Transforms/InstCombine/CPP_min_max.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16409 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 19:18:10 +00:00
Chris Lattner
fff03c9074 Fix a nasty iterator invalidation problem I introduced yesterday. This
unfortunately is the cause of a bunch of failures from tonight, and the
reason the tester is running so slow :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 19:01:06 +00:00
Chris Lattner
a744b77e11 Remove a whole bunch of horrible hacky code that was used to promote allocas
whose addresses where used by trivial phi nodes and select instructions.  This
is now performed by the instcombine pass, which is more powerful, is much
simpler, and is faster.  This allows the deletion of a bunch of code, two
FIXME's and two gotos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 18:51:51 +00:00
Chris Lattner
c10acedb2d Make instruction combining a bit more aggressive in the face of volatile
loads, and implement two new transforms: InstCombine/load.ll:test[56].


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16404 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 18:43:46 +00:00
Reid Spencer
7b60a15abc Minor correction to Signals implementation.
Patch submitted by Jeff Cohen. Thanks Jeff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16401 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 05:37:39 +00:00
Chris Lattner
f5afcabff8 Add comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16400 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-19 01:05:16 +00:00
Chris Lattner
0c0aa711b8 Fix the inliner to always delete any edges from the external call node to
a function being deleted.  Due to optimizations done while inlining, there
can be edges from the external call node to a function node that were not
apparent any longer.

This fixes the compiler crash while compiling 175.vpr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16399 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 21:37:03 +00:00
Chris Lattner
cd382a3725 Add CallGraphNode::removeAnyCallEdgeTo method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 21:34:34 +00:00
Reid Spencer
111a348435 Use the /dev/zero device as the device on which the pages are mapped.
Patch contributed by Henrik Bach. Thanks Henrik!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 19:34:09 +00:00
Reid Spencer
d0c9e0ee0d Porting of Unix implementation to Win32.
Patch contributed by Jeff Cohen. Thanks Jeff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16396 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 19:29:16 +00:00
Reid Spencer
622e220ca7 Get rid of file descriptor leak in create_file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 19:25:11 +00:00
Chris Lattner
5eb6f6c829 Convert this pass to be a CallGraphSCCPass instead of a Pass, which eliminates
the worklist and makes it more efficient.  This does not change functionality
at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16390 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 00:34:13 +00:00
Chris Lattner
afbb1ccd2f Make sure to remove the Select instruction as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 00:32:40 +00:00
Chris Lattner
3795bc9785 When changing a function, make sure to update the CallGraphNode for the
function, not just the CallGraph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16388 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 00:27:20 +00:00
Chris Lattner
6f7e5ebb42 Implement new changeFunction method, nuke a never implemented one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 00:22:13 +00:00
Chris Lattner
ebeb0cba94 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16384 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-17 03:58:39 +00:00
Reid Spencer
298d6c14ca Make sure critical sections are entered before trying to leave them.
Add some additional commentary about the workings of this module.

Patch contributed by Jeff Cohen. Thanks Jeff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-17 03:02:27 +00:00
Reid Spencer
0cc2d0a1b8 Allow "bc" as suffix for bytecode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16381 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-16 16:36:10 +00:00
Reid Spencer
90b5413883 Implement the signals interface for Win32.
Patch provided by Jeff Cohen. Thanks Jeff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16380 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-16 15:53:16 +00:00
Chris Lattner
acf808951b Add a newline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16369 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:53:52 +00:00
Reid Spencer
2da5c3dda6 Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:06:42 +00:00
Chris Lattner
3080b605d7 Add some assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 16:59:47 +00:00
Reid Spencer
b016a376ab Patches to make this file actually compile under windows.
Patches submitted by Jeff Cohen. Thanks Jeff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16362 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 05:49:50 +00:00
Reid Spencer
90418436c0 Initial version of the SysConfig abstraction for Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16361 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 05:48:49 +00:00
Reid Spencer
0b22ba4c30 First version of a common header file for Win32 implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 05:48:11 +00:00
Reid Spencer
437b079a29 Initial implementation of the Process abstraction for Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 05:47:40 +00:00
Reid Spencer
4909b6c60c Fix the interface to ReleaseRWX to take MemoryBlock& not Memory&
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 03:55:45 +00:00
Chris Lattner
bdacd87957 Fix a bug in the previous checkin that broke 255.vortex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 02:34:40 +00:00
Alkis Evlogimenos
e0de1d64be When creating constant arrays check that the initializer vector is the
same size as the one in the array type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 02:32:15 +00:00
Misha Brukman
a2700194ae Fit long lines into 80 cols via creative space elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:40:18 +00:00
Misha Brukman
3559a93f5e Wrap long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:34:42 +00:00
Misha Brukman
07542c8c20 Targets are independent of each other, so compile them in parallel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:34:25 +00:00
Chris Lattner
fb3ee1930b Make sure to update alias analysis information as we transform the function.
This fixes PR420 and Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16348 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:04:07 +00:00
Chris Lattner
62e29b59f5 If given an AliasSetTracker object to update, update it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:02:54 +00:00
Chris Lattner
b66e648e95 Implement an AliasSetTracker::copyValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 19:15:32 +00:00
Chris Lattner
b50f1f13e2 Remove a long-dead pass. Actually, this pass was never used at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16337 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 16:33:01 +00:00
Reid Spencer
8c0c33984b Fix a compilation error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16335 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 15:42:11 +00:00
Reid Spencer
1c7b907325 Okay, the list of link-time passes wasn't such a hot idea. Its prone to
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 05:43:23 +00:00
Chris Lattner
44da7d7976 Don't print newlines between passes in the pass list.
Note to self: sentences end with ".", not "...".
Note to reid: sentences end with ".", not "".   :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 05:06:58 +00:00
Chris Lattner
cfe97b78e7 Don't print newlines between each library in the deplibs list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16331 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 04:51:44 +00:00
Chris Lattner
b228657acc Revamp the Register class, and allow the use of the RegisterGroup class to
specify aliases directly in register definitions.

Patch contributed by Jason Eckhardt!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16330 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 04:17:02 +00:00
Reid Spencer
74e7261e90 Implement the GetLibraryPath function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16323 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 00:16:39 +00:00