Commit Graph

4688 Commits

Author SHA1 Message Date
Chris Lattner da03a8a792 Add new argument to disable checking
llvm-svn: 9922
2003-11-12 17:58:22 +00:00
Chris Lattner 3b93c91836 Detect problems with PHI node operands!
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Chris Lattner b740afb2b0 Print return nodes for graphs with multiple functions in them correctly
llvm-svn: 9914
2003-11-12 04:58:19 +00:00
Chris Lattner 12c71c00ef Don't crash if no gg
llvm-svn: 9913
2003-11-12 04:57:58 +00:00
Chris Lattner ebcf5a5dba Fix bug PR107, patch contributed by Reid Spencer!
llvm-svn: 9911
2003-11-12 04:40:30 +00:00
Chris Lattner a9450bd4ac Cleanups
llvm-svn: 9907
2003-11-12 00:40:34 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke 251b979943 Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
llvm-svn: 9901
2003-11-11 21:53:50 +00:00
Chris Lattner da05b05197 Compute node offsets correctly
llvm-svn: 9895
2003-11-11 20:12:32 +00:00
Brian Gaeke ca35fbf33d Add implementation of FileOpenable().
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().

llvm-svn: 9892
2003-11-11 18:27:21 +00:00
Chris Lattner fdc8d6547b Add new method for computing node mappings. This is used by the pool allocator
llvm-svn: 9880
2003-11-11 05:08:59 +00:00
Brian Gaeke 8f53a89edf Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.

llvm-svn: 9858
2003-11-10 07:12:01 +00:00
Chris Lattner 1e6d3053f2 Reorganize code for locality, improve comments
llvm-svn: 9857
2003-11-10 04:42:42 +00:00
Chris Lattner 4474336166 Adjust to new critical edge interface
llvm-svn: 9853
2003-11-10 04:10:50 +00:00
Brian Gaeke c0c23c29aa Operand numbers are now ints. Save the register allocation of the value
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().

llvm-svn: 9842
2003-11-10 00:05:26 +00:00
Chris Lattner 9a010038f1 More additions
llvm-svn: 9834
2003-11-09 19:54:30 +00:00
Chris Lattner a570f7b681 Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!

llvm-svn: 9832
2003-11-09 19:39:48 +00:00
Chris Lattner da8571b464 Add an assertion
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Brian Gaeke 75bc7cec4b Fix PR103
llvm-svn: 9830
2003-11-09 07:08:34 +00:00
Chris Lattner 984e11792f Do NOT inline self recursive calls into other functions. This is causing the
pool allocator no end of trouble, and doesn't make a lot of sense anyway.  This
does not solve the problem with mutually recursive functions, but they are much less common.

llvm-svn: 9828
2003-11-09 05:05:36 +00:00
Chris Lattner d61abe82d3 Untypo
llvm-svn: 9827
2003-11-09 05:04:25 +00:00
Chris Lattner 950c75f135 Add more functions
llvm-svn: 9826
2003-11-09 04:10:41 +00:00
Chris Lattner 5011b956a9 None of the __llvm_* functions call into the program. This makes the
callgraph MUCH simpler for eh using program.

llvm-svn: 9825
2003-11-09 04:00:59 +00:00
Chris Lattner cff83a2f24 Add support for memmove
llvm-svn: 9824
2003-11-09 03:32:52 +00:00
Brian Gaeke c3c242c3ac Remove #include of PassManager.h which was marked FIXME, and apparently is no
longer used.

llvm-svn: 9823
2003-11-09 03:15:40 +00:00
Chris Lattner 12dd38aa99 Handle bzero and memset in the local analysis, because we were missing the fact
that memset returns its argument!!

llvm-svn: 9811
2003-11-08 21:55:50 +00:00
Chris Lattner 2cb1db763e This doesn't use DSCallSiteIterator
llvm-svn: 9809
2003-11-08 21:17:37 +00:00
Brian Gaeke f8cb2419ee Fix two typos I found in comments.
llvm-svn: 9806
2003-11-08 18:12:24 +00:00
Misha Brukman a1eefa40dc For some reason, LICM and GCSE like to crash the FunctionPassManager when they
are being added as FunctionPasses... Sigh.

llvm-svn: 9798
2003-11-08 00:01:39 +00:00
Brian Gaeke 9ef636c698 Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArg
still causes a crash. But it's better than before.

llvm-svn: 9794
2003-11-07 21:20:47 +00:00
Misha Brukman 508cc3e7a9 Implement branching to a PC-relative constant (not a BasicBlock).
llvm-svn: 9793
2003-11-07 21:07:30 +00:00
Brian Gaeke 85baf8c65a popStackAndReturnValueToCaller() must advance instruction pointer to normal
destination, if returning from an invoke.

Implement 'unwind' instruction.

llvm-svn: 9792
2003-11-07 20:44:58 +00:00
Misha Brukman 3b2343eae9 PreSelection is not optional, it performs a necessary and vital transformation
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.

Also, it's now available for the JIT since it is a FunctionPass.

llvm-svn: 9791
2003-11-07 20:33:25 +00:00
Misha Brukman d7bcd99325 Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.
llvm-svn: 9790
2003-11-07 20:32:08 +00:00
Brian Gaeke 6d145eb65f Add stub version of unwind support
llvm-svn: 9789
2003-11-07 20:07:06 +00:00
Brian Gaeke a6454d3532 visitCallInst --> visitCallSite.
Use visitCallSite to implement both CallInsts and InvokeInsts.

llvm-svn: 9788
2003-11-07 20:04:22 +00:00
Brian Gaeke a6d48e4db2 Make the operation of visitCallInst() only depend on the CallSite.
llvm-svn: 9787
2003-11-07 19:59:08 +00:00
Brian Gaeke 18b59578c9 Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
llvm-svn: 9784
2003-11-07 19:26:23 +00:00
Misha Brukman 2c3068026a Switch to emitting MachineConstantPool the way it was meant to be done.
llvm-svn: 9777
2003-11-07 18:06:26 +00:00
Misha Brukman 2133b0513d Switch to using the standard representation of the constant pool -- namely, the
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.

llvm-svn: 9776
2003-11-07 17:45:28 +00:00
Misha Brukman faa42d264f We accept TargetMachine as a const reference.
llvm-svn: 9775
2003-11-07 17:44:18 +00:00
Misha Brukman bd4a8ed139 PreSelection and PeepholeOpts are now FunctionPasses.
llvm-svn: 9774
2003-11-07 17:43:43 +00:00
Misha Brukman 81c748c1e2 * Stop making a global for each constant that cannot live in an instruction;
it will be converted to a MachineConstantPool index during instruction
  selection
* This is now eligible to become a FunctionPass since it does not have any side
  effects outside of the function it is processing.

llvm-svn: 9773
2003-11-07 17:31:22 +00:00
Misha Brukman bf9ed7ac1f * Use the MachineConstantPool for storing constants instead of a hash_set;
* Do not create new globals for constants!

Also, order #includes as per coding style guide

llvm-svn: 9772
2003-11-07 17:29:48 +00:00
Misha Brukman c16149d7dd Use `basename $<` to get just the filename, not full path, for ease of reading.
llvm-svn: 9770
2003-11-07 17:26:27 +00:00
Misha Brukman ad03afcb34 Declare FunctionPasses as such so that they can be used in FunctionPassManager.
llvm-svn: 9768
2003-11-07 17:20:18 +00:00
Brian Gaeke 65cac90a92 Refactor the return-from-function code into popStackAndReturnValueToCaller().
Make external function calls slightly less special; now they get a stack frame.

llvm-svn: 9765
2003-11-07 05:22:49 +00:00
Chris Lattner 5285e9c9a0 Hopefully this will fix PR98
llvm-svn: 9762
2003-11-07 00:38:09 +00:00
Chris Lattner 395aef6bbe Hopefully fix the objdir != srcdir issue
llvm-svn: 9761
2003-11-07 00:34:33 +00:00
Chris Lattner 72a4db8b92 Fix warnings building on sparc
llvm-svn: 9758
2003-11-06 21:30:05 +00:00