Commit Graph

13393 Commits

Author SHA1 Message Date
Misha Brukman
f228fa0580 Add COND_BRANCH pseudo instruction, patch by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15283 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 18:35:54 +00:00
Misha Brukman
fa20a6dfd7 Build COND_BRANCHes which may become long or short, decided by a later pass.
Patch by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15282 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 18:35:23 +00:00
Misha Brukman
8aebe9f96c Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
Patch by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 18:34:11 +00:00
Misha Brukman
999d9cfde5 Add PowerPCBranchSelector to discover which are `long' branches.
Contributed by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15280 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 18:33:06 +00:00
Brian Gaeke
c998981505 TargetInstrInfo::getNOPOpCode() has been replaced by a reference to V9::NOP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15279 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:24 +00:00
Brian Gaeke
a376ee2d13 Convert many of the virtual TargetInstrInfo methods used as helper
functions in SparcV9InstrSelection and SparcV9PreSelection into regular
old global functions.  As it happens, none of them really have anything
to do with TargetInstrInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15278 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:23 +00:00
Brian Gaeke
1b4aeb5cec As it happens, none of these TargetInstrInfo methods which are only
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15277 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:22 +00:00
Brian Gaeke
96d4bf7aee Make the create...() functions for some of these passes return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15276 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:21 +00:00
Misha Brukman
c91bc30436 Fixed saving/restoring LR unconditionally, only done as necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15275 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:17:48 +00:00
Misha Brukman
9a771d55fe Save and restore LR just like any other register and ONLY if we actually modify
it (due to calls or globals access).  We now compile `void empty(){}' to `blr'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15274 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:17:18 +00:00
Misha Brukman
e862f306fb LR is a 32-bit int reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15273 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:15:32 +00:00
Misha Brukman
53f567817c MovePCtoLR (which is `bl' in disguise) modifies LR implicitly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15272 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:15:05 +00:00
Misha Brukman
08cc7b30bb Register LR is callee-saved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15271 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:14:34 +00:00
Misha Brukman
435c785803 Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15270 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:13:58 +00:00
Chris Lattner
892cdb3b3a Ugh, the upgrade of zion brought in GCC 3.3.2, our arch nemesis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15269 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:29:06 +00:00
Chris Lattner
2d26ffb679 Run DSE at link-time, and turn on an IP alias analysis by default in gccld!
The -disable-globalsmodref is temporary and will be removed eventually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15268 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:13:15 +00:00
Chris Lattner
b0015c510f nuke pointless -debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15267 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:03:18 +00:00
Chris Lattner
ccb354b687 New functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:50:07 +00:00
Chris Lattner
fdec1d5f24 Document new syntax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15265 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:49:39 +00:00
Chris Lattner
105d26acb4 Fix conservative assumption, which was quite broken. Also, notice that
functions known to not access memory (like sin/cos) don't access memory! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15264 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:46:26 +00:00
Chris Lattner
eaa243039b Fix hoisting of void typed values, e.g. calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15263 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:38:32 +00:00
Chris Lattner
70c7d03d1c alloca void makes no sense
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15262 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:30:02 +00:00
Chris Lattner
63e9930498 Remove a bogus assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15261 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:22:21 +00:00
Chris Lattner
fe98f27e80 Complete rewrite of this pass to be faster, use less memory, be easier to
understand, and more accurate to boot!  This implements
GlobalModRef/purecse.ll over the previous impl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15260 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 06:40:37 +00:00
Chris Lattner
a9db34f13c new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15259 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 06:35:11 +00:00
Chris Lattner
059f5a5e05 Have some testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15258 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 06:26:08 +00:00
Chris Lattner
1c2b1294d3 Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15257 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 04:00:54 +00:00
Chris Lattner
8a1478b6d7 Fix out of date comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15256 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 03:04:30 +00:00
Chris Lattner
bcb11cf132 Simplify code and silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:34:49 +00:00
Chris Lattner
efe30ef790 Use context-sensitive alias analysis to avoid pessimization in clients of
AliasSetTracker (dse and licm).  This implements
DeadStoreElimination/context-sensitive.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15254 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:20:26 +00:00
Chris Lattner
cbb4b574c0 New testcase. DSE should delete all of the DEAD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:19:27 +00:00
Chris Lattner
db5b80a7f2 Make basicaa a bit more aggressive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:18:52 +00:00
Chris Lattner
e181b94309 basic-aa can actually provide simple mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15251 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:13:55 +00:00
Chris Lattner
05e47987ee This was implemented back in march
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15250 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 01:59:42 +00:00
Chris Lattner
1dba7abdd7 Implement test/Regression/TableGen/ListSlices.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15249 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 01:01:21 +00:00
Chris Lattner
3aa965fbf4 New testcase for list slicing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15248 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 01:00:56 +00:00
Chris Lattner
b0fef64dc9 Add initial support for list slices. This currently allows you to do stuff
like this:

def B {
  list<int> X = [10, 20, 30, 4, 1, 1231, 20] [2-4,2,2,0-6];
}

... which isn't particularly useful, but more is to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15247 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 23:21:34 +00:00
Reid Spencer
a60ff2e144 A utility to run an arbitrary program on each of the LLVM source files.
This is like llvmgrep but instead of running grep, it runs the command
given by the first argument. For example, to find the top ten files with
the most lines in llvm, you could:

utils/llvmdo wc -l | sort -nb | tail

Or, to find any source files with the wrong permissions, you could:

utils/llvmdo ls -l | grep -v rw-r--r--

Hopefully, you get the idea.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15246 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 22:52:44 +00:00
Misha Brukman
ab640a5728 Do not store the stack pointer if the stack size is 0.
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15245 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 22:00:26 +00:00
Misha Brukman
3ada3e3f82 ADDI can take several forms, including:
addi r1, r2, 0
  addi r1, <frame index #n>, 0

so we must check for the second parameter being a register for this instruction
to be considered a reg-to-reg copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15244 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 21:50:38 +00:00
Misha Brukman
8790d47453 assert() on MachineInstr properties instead of checking them dynamically
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15243 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 21:35:58 +00:00
Misha Brukman
774a297c83 * Recognize `addi r1, r2, 0' a move instruction
* List formats of instructions currently recognized as moves


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15242 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 21:29:00 +00:00
Chris Lattner
1aab327293 Remove dead section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15241 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 21:16:55 +00:00
Misha Brukman
8606aea117 Fix indentation: should be 2 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15240 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:48:58 +00:00
Misha Brukman
91b5ca838a Fix file header as it has been renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:45:48 +00:00
Misha Brukman
c6d398abbb Renamed files to have the `X86' prefix for uniqueness purposes.
All CVS history was renamed, the *,v were copied over.  No worries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15238 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:43:11 +00:00
Misha Brukman
b097f216b0 * Rewrote casts
* Implemented GEP folding
* Dynamically output global address stuff once per function
* Fix casting fp<->short/byte

Patch contributed by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15237 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:13:24 +00:00
Misha Brukman
cf8d244394 Increment the label number in runOnFunction() rather than while printing out
some instruction.  Patch by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15236 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 16:28:33 +00:00
Misha Brukman
bb966a4a59 More notes on bugs, unimplemented features, and suggested code improvements.
Written by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15235 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 16:23:55 +00:00
Misha Brukman
3c616b45e7 Fix subtracting values > 2^15 in the prologue/epilogue, by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15234 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 16:22:52 +00:00