Brian Gaeke
246426591b
Remove a comment which no longer applies.
...
llvm-svn: 9712
2003-11-05 00:59:28 +00:00
Chris Lattner
ac2e4e15dd
Minor cleanup, plus implement InstCombine/xor.ll:test17
...
llvm-svn: 9711
2003-11-04 23:50:51 +00:00
Chris Lattner
a309338bd4
Implement InstCombine/xor.ll:test(15|16)
...
llvm-svn: 9708
2003-11-04 23:37:10 +00:00
Alkis Evlogimenos
c6a7c83333
Change all machine basic block modifier functions in MRegisterInfo to
...
return the number of instructions added to/removed from the basic block
passed as their first argument.
Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.
llvm-svn: 9704
2003-11-04 22:57:09 +00:00
Brian Gaeke
8dadbe31dc
Update verifySavedState()'s comment, so that it reflects its current
...
status. In doFinalization(), skip over external functions, just like
Anand's mapping info does.
llvm-svn: 9703
2003-11-04 22:42:41 +00:00
Brian Gaeke
f641ebe313
Add comments.
...
llvm-svn: 9697
2003-11-04 18:25:56 +00:00
Chris Lattner
c4cfc20335
Fix problems in previous changes. This fixes several regressions last night.
...
llvm-svn: 9694
2003-11-04 16:04:32 +00:00
John Criswell
3e30e40801
Checking in Chris's suggestions:
...
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.
llvm-svn: 9693
2003-11-04 15:22:26 +00:00
Chris Lattner
414e572f11
Significantly simplify constant emission by unifying the stuff which used to build up
...
strings with the stuff that used to print to an ostream directly. We now NEVER build
up big strings, only to print them once they are formed.
llvm-svn: 9686
2003-11-03 20:19:49 +00:00
Chris Lattner
f100e90240
Incorporate printSingleConstantValue into its single caller
...
llvm-svn: 9684
2003-11-03 19:44:05 +00:00
Chris Lattner
2943114bfd
* Reformat some code
...
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
PR 83 & Jello/2003-11-03-GlobalBool.llx
llvm-svn: 9683
2003-11-03 19:33:45 +00:00
Chris Lattner
8a01e11594
Fix InstCombine/2003-11-03-VarargsCallBug.ll
...
llvm-svn: 9681
2003-11-03 18:44:58 +00:00
Chris Lattner
40b6a81c43
Work around a bug in GCC where it can't handle common variables marked weak.
...
llvm-svn: 9679
2003-11-03 17:35:00 +00:00
Chris Lattner
8e65bbe451
Fix bugs with attribute weak emission
...
llvm-svn: 9678
2003-11-03 17:32:38 +00:00
Chris Lattner
19a418db92
Implement InstCombine/cast-set.ll:test6[a]. This improves code generated for
...
a hot function in em3d
llvm-svn: 9673
2003-11-03 05:17:03 +00:00
Chris Lattner
41e6298462
This simplifies the CWriter code, makes the generated code easier to read,
...
and makes the output work with the intel compiler. Overall, a win.
llvm-svn: 9671
2003-11-03 04:31:54 +00:00
Chris Lattner
d8c97ff65d
Implement InstCombine/cast-set.ll: test1, test2, test7
...
llvm-svn: 9670
2003-11-03 04:25:02 +00:00
Chris Lattner
01dd059e75
Fix bug with zero sized casts
...
llvm-svn: 9667
2003-11-03 01:29:41 +00:00
Chris Lattner
c92cb7905b
Eliminate the silly namedContext member of printType
...
llvm-svn: 9666
2003-11-03 01:01:59 +00:00
Chris Lattner
a71b07eeca
All DSGraphs keep a reference to the targetdata they are created with. This is
...
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.
llvm-svn: 9659
2003-11-02 22:27:28 +00:00
Chris Lattner
63fb5bcaac
Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
...
llvm-svn: 9658
2003-11-02 21:02:20 +00:00
Chris Lattner
e005f61e9e
Fix bug in previous checkin
...
llvm-svn: 9656
2003-11-02 06:54:48 +00:00
Chris Lattner
a06aa3d2f2
Implement transmogriphication of allocation instructions
...
llvm-svn: 9654
2003-11-02 05:57:39 +00:00
Chris Lattner
d6b4a4c1c9
Fix PR78
...
llvm-svn: 9648
2003-11-02 02:06:27 +00:00
Chris Lattner
4db6e0ea7a
The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even try
...
to emit types which are not used.
llvm-svn: 9647
2003-11-02 01:29:27 +00:00
Chris Lattner
29f03b2d39
Including the symbol table in the FindUsedTypes analysis was the WRONG way
...
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll. This completely
neutered the deadtypeelim pass.
llvm-svn: 9646
2003-11-02 01:28:41 +00:00
Chris Lattner
18192fe20c
Strip off CPR's manually, because if we don't, the inliner doesn't delete dead
...
functions. GRR
llvm-svn: 9641
2003-10-31 21:05:58 +00:00
Chris Lattner
9c85e0b72c
Make the call graph more precise despite the hated constantpointerrefs.
...
Do you detect the animosity I feel towards CPRs yet?
llvm-svn: 9640
2003-10-31 21:05:12 +00:00
Chris Lattner
78b09155e1
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Chris Lattner
18283ea9f0
Constant pointer refs are causing these to fail unnecessarily, which is causing
...
a lot of code to be pessimized. I hate CPRs. :(
llvm-svn: 9635
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
006108d3b6
Use already existing classes for post order iterator.
...
llvm-svn: 9629
2003-10-31 03:02:34 +00:00
Chris Lattner
c49a7fd37d
Make use of the new AssemblyAnnotationWriter interface
...
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Brian Gaeke
29d56dd004
Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
...
implementing verifySavedState().
In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.
llvm-svn: 9617
2003-10-30 21:21:33 +00:00
Brian Gaeke
e78feb1c40
Make AllocState an enum.
...
Move the stringifying method for that enum into class AllocInfo.
llvm-svn: 9616
2003-10-30 21:21:22 +00:00
Alkis Evlogimenos
30f4eb0dc0
Output types in reverse postorder. This will allow the ByteCode/Reader
...
to create the minimum number of opaque types for each type with a
cycle in its type graph.
llvm-svn: 9615
2003-10-30 21:04:44 +00:00
Alkis Evlogimenos
9430d79c1f
Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
...
inside DEBUG_OUTPUT so that it compiles.
llvm-svn: 9614
2003-10-30 18:33:58 +00:00
Chris Lattner
586db4056a
When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
...
llvm-svn: 9611
2003-10-30 05:17:30 +00:00
Chris Lattner
034bfaddf0
Make sure that PHI node operands are first class types
...
llvm-svn: 9607
2003-10-30 01:38:18 +00:00
Chris Lattner
c8ea13f032
Fix bug: 2003-10-29-CallSiteResolve.ll & PR70
...
llvm-svn: 9600
2003-10-30 00:46:41 +00:00
Chris Lattner
f24ae5a0ed
Print the names of more opaque types
...
llvm-svn: 9598
2003-10-30 00:22:33 +00:00
Chris Lattner
a2fcab56e3
Make sure to print opaque types names if they are available.
...
llvm-svn: 9597
2003-10-30 00:12:51 +00:00
Chris Lattner
7c5cf380af
Refactor code, initial implementation of -insert-block-profiling pass
...
llvm-svn: 9593
2003-10-29 21:24:22 +00:00
Brian Gaeke
ee245ddcdf
Explicitly cast type, so we aren't passing output_vbr a size_t.
...
llvm-svn: 9590
2003-10-29 20:09:01 +00:00
Brian Gaeke
0d26a4c53d
Tweak sed commands so that they filter out more # stuff and also
...
work on Mac OS X. Also turn ${...} into $(...); we do not speak BSD
Make.
llvm-svn: 9589
2003-10-29 20:07:35 +00:00
Chris Lattner
cb21ea9a32
Fix PR66 & ScalarRepl/2003-10-29-ArrayProblem.ll
...
llvm-svn: 9585
2003-10-29 17:55:44 +00:00
Chris Lattner
89b33b1999
Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64
...
llvm-svn: 9579
2003-10-29 06:01:26 +00:00
Brian Gaeke
d6816f603f
In VM::create(), comment out almost the whole function if NO_JITS_ENABLED,
...
because the Arch variable will likely be undefined.
llvm-svn: 9576
2003-10-29 04:24:09 +00:00
Alkis Evlogimenos
81ad09e0ab
Add more debugging info to help tracing the SlotCalculator.
...
llvm-svn: 9575
2003-10-29 03:12:12 +00:00
Chris Lattner
01c0589d69
Check in statistifying patch for Bill
...
llvm-svn: 9572
2003-10-28 23:14:59 +00:00
Chris Lattner
305fcb1536
Fix PR62, and llvm/test/Regression/CBackend/2003-10-28-CastToPtrToStruct.ll
...
ConstantExpr's can use unrelated types, make sure to scan them.
llvm-svn: 9569
2003-10-28 23:09:45 +00:00
Chris Lattner
19e529f0e3
Pass in argc & argv
...
llvm-svn: 9563
2003-10-28 22:42:24 +00:00
Chris Lattner
7e6b286041
Initial checkin of profiling instrumentation pass. So far, despite the
...
file name, we only support function profiling. This will be fixed in the
near future.
llvm-svn: 9547
2003-10-28 18:59:04 +00:00
Chris Lattner
51c13a0c9a
Eliminate using declarations
...
llvm-svn: 9543
2003-10-27 21:44:09 +00:00
Chris Lattner
bbca4bb7a6
Propagating constants to arguments can make other arguments constant. For now
...
do something dumb, and inefficient, but more complete.
llvm-svn: 9542
2003-10-27 21:09:00 +00:00
Chris Lattner
00fed59c28
Fix test: Linker/2003-10-27-LinkOncePromote.ll
...
Fix PR58
llvm-svn: 9530
2003-10-27 16:39:39 +00:00
Chris Lattner
4fb1540128
Get the list of PHI node values before the basic block is split. Also, add
...
PHI node entries for unwind instructions just like for call instructions which
became invokes! This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll
llvm-svn: 9526
2003-10-27 05:33:09 +00:00
Chris Lattner
c24e1ebf3f
Attempt to provide support for those without RTLD_DEFAULT.
...
llvm-svn: 9503
2003-10-25 16:55:32 +00:00
Chris Lattner
4271c6fea0
Unbreak the build
...
llvm-svn: 9502
2003-10-25 16:18:03 +00:00
Brian Gaeke
04e6824a3f
Publicize the type of FnAllocState.
...
Prototype option to save state in a global instead of as a Constant in
the Module. (Turned off, for now, with the on/off switch welded in the off
position. You get the idea.)
llvm-svn: 9500
2003-10-24 21:21:58 +00:00
Chris Lattner
d09d070385
standardize command line option names
...
llvm-svn: 9496
2003-10-24 20:05:58 +00:00
Brian Gaeke
1de42e556d
ExecutionEngine::create no longer takes a TraceMode argument.
...
CurFrame, TraceMode, and the CachedWriter are history.
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
ExecutionContext now keeps Values for each stack frame in a std::map.
printValue() and print() are history.
executeInstruction() is now part of run().
llvm-svn: 9493
2003-10-24 19:59:37 +00:00
Brian Gaeke
8abf6d4df3
ExecutionEngine::create no longer takes a TraceMode argument.
...
CurFrame, TraceMode, and the CachedWriter are history.
llvm-svn: 9492
2003-10-24 19:59:28 +00:00
Brian Gaeke
719a4c165f
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
...
llvm-svn: 9490
2003-10-24 19:59:18 +00:00
Brian Gaeke
032ca42757
Reduce the number of #includes.
...
CurFrame, TraceMode, and the CachedWriter are history.
ArrayChecksEnabled and non-QuietMode are history.
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
ExecutionContext now keeps Values for each stack frame in a std::map.
Stop pre-initializing Values on the stack to 42.
Remove some dead variables, excess whitespace and commented-out code.
executeInstruction() is now part of run().
printValue() and print() are history.
llvm-svn: 9489
2003-10-24 19:59:01 +00:00
Brian Gaeke
d857892674
ExecutionEngine::create no longer takes a TraceMode argument.
...
llvm-svn: 9488
2003-10-24 19:58:38 +00:00
Brian Gaeke
a039f6bb07
Destroy MachineFunction for any Function that we are about to
...
recompile and relink. This keeps it from failing an assertion when
it goes and tries to construct a new MachineFunction for that Function.
llvm-svn: 9459
2003-10-24 03:55:37 +00:00
Brian Gaeke
665123fb99
Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
...
llvm-svn: 9452
2003-10-23 20:39:18 +00:00
Brian Gaeke
6d9f7ff0df
Move AllocInfo structure to a private AllocInfo.h header file.
...
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
AllocInfos to LLVM Constants.
llvm-svn: 9451
2003-10-23 20:32:55 +00:00
Brian Gaeke
98fbdd344e
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
...
llvm-svn: 9450
2003-10-23 20:32:02 +00:00
Brian Gaeke
ede0b08125
New file, containing AllocInfo structure.
...
llvm-svn: 9449
2003-10-23 20:31:51 +00:00
Chris Lattner
28732137bc
Fix bug: CBackend/2003-10-23-UnusedType.ll and hopefully 252.eon
...
llvm-svn: 9441
2003-10-23 19:30:30 +00:00
Chris Lattner
0683439f74
We might as well strip off any CPRs before propagation
...
llvm-svn: 9437
2003-10-23 18:49:23 +00:00
Chris Lattner
8ede493de1
Fail gracefully if we have a zero arg varargs function
...
llvm-svn: 9436
2003-10-23 18:39:22 +00:00
Misha Brukman
966d423f89
* Eliminate `using' directive
...
* Fix order of #includes
* Make code layout more consistent
* Eliminate extraneous whitespace and comment-lines
llvm-svn: 9433
2003-10-23 18:10:02 +00:00
Misha Brukman
97911fb3bb
* Fix order of #include files
...
* Doxygen-ify method comments
llvm-svn: 9432
2003-10-23 18:06:27 +00:00
Misha Brukman
c1b01b50fb
* Order #includes as per style guide
...
* Doxygen-ify comments
* Make code layout more consistent
llvm-svn: 9431
2003-10-23 18:03:50 +00:00
Misha Brukman
765938c377
* Use C++ style comments instead of C-style
...
* Make file description more readable
* Make code layout more consistent, include comment in assert so it's visible
during execution if it hits
llvm-svn: 9430
2003-10-23 18:02:47 +00:00
Misha Brukman
6ace5e86b1
* Eliminate `using' directive
...
* Order #includes as per style guide
llvm-svn: 9429
2003-10-23 18:00:34 +00:00
Chris Lattner
9273a90311
* We were forgetting to pass varargs arguments through a call
...
* Add a work around for bug PR56, gross but necessary for now.
llvm-svn: 9428
2003-10-23 17:44:53 +00:00
Misha Brukman
2c119cec9b
* Eliminate `using' directive
...
* Make code layout more consistent
llvm-svn: 9427
2003-10-23 17:43:17 +00:00
Misha Brukman
22e5a5848b
Make code layout more consistent.
...
llvm-svn: 9426
2003-10-23 17:39:37 +00:00
Chris Lattner
0e32494c79
Delete unused EmitByteSwap method
...
Implement mul/div/rem constant expressions
llvm-svn: 9424
2003-10-23 17:21:43 +00:00
Chris Lattner
ab282af103
Check in initial version of ipcp
...
llvm-svn: 9423
2003-10-23 16:52:27 +00:00
Misha Brukman
6a1c1640f5
Make code layout more consistent.
...
llvm-svn: 9418
2003-10-23 16:48:30 +00:00
Misha Brukman
0f649c0045
* Order includes according to style guide
...
* Convert tabs to spaces
* Make code fit within 80 columns
llvm-svn: 9416
2003-10-23 16:22:08 +00:00
Chris Lattner
4347464e2a
Fix bug: instcombine/2003-10-23-InstcombineNullFail.ll
...
llvm-svn: 9403
2003-10-23 05:21:48 +00:00
Chris Lattner
51684bea99
Make this pass substantially stronger by having it delete dead return values
...
as well as arguments. Now it can delete arguments and return values which are
only passed into other arguments or are returned, if they are dead. This causes
it to delete several hundred extra args/retvals from the C++ hello world program,
shrinking it by about 2K.
llvm-svn: 9398
2003-10-23 03:48:17 +00:00
Chris Lattner
d4e7c091a5
This important patch fixes two warnings in the linker which can occur from linking
...
valid pieces of code
llvm-svn: 9390
2003-10-22 23:03:38 +00:00
Brian Gaeke
916b2522f9
Change the type of FnAllocState.
...
llvm-svn: 9388
2003-10-22 20:44:29 +00:00
Brian Gaeke
5952eddbfb
Don't worry about converting each function's reg. alloc. state into One Big
...
Constant early on, because we can do it in doFinalization.
Tighten up a comment.
llvm-svn: 9387
2003-10-22 20:44:23 +00:00
Brian Gaeke
4e1aade603
Add prototype for verifySavedState().
...
llvm-svn: 9386
2003-10-22 20:23:13 +00:00
Brian Gaeke
08fc8bcce4
Doxygenify method comments.
...
Try to improve method comments a little.
Get rid of some excess whitespace; put braces on previous line when possible.
Add stub for method to verify the work of saveState().
llvm-svn: 9385
2003-10-22 20:22:53 +00:00
Chris Lattner
307255971c
This is a disgusting hack that improves code substantially, by making
...
callgraphSCC passes more effective.
llvm-svn: 9384
2003-10-22 18:53:31 +00:00
Chris Lattner
ce023da56a
Do not add unreachable code to a natural loop!
...
llvm-svn: 9377
2003-10-22 16:41:21 +00:00
Chris Lattner
43276ffbf4
Make sure to print labels on nodes without names
...
llvm-svn: 9376
2003-10-22 16:30:58 +00:00
Chris Lattner
dd7d5d8172
If the basic block has no name, make sure to print the % number of it
...
llvm-svn: 9375
2003-10-22 16:22:42 +00:00
Chris Lattner
8476f4bb56
Implement the Function::viewCFG* methods, for use in a debugger. Also, the
...
-print-cfg pass now lives here.
llvm-svn: 9374
2003-10-22 16:03:49 +00:00
Misha Brukman
55695cc963
Add comments to describe what these functions actually do.
...
llvm-svn: 9370
2003-10-22 05:50:40 +00:00
Misha Brukman
f79e50487f
* Use <cmath> instead of <math.h>
...
* Order #includes according to LLVM coding standards
llvm-svn: 9369
2003-10-22 05:09:56 +00:00
Misha Brukman
7456b8a58d
Removed completely duplicated function comment (an identical one appears later).
...
llvm-svn: 9368
2003-10-22 04:55:09 +00:00
Misha Brukman
ed0f9660bc
No, really, order the #includes correctly.
...
llvm-svn: 9367
2003-10-22 04:51:36 +00:00
Chris Lattner
5b2282a2e4
Update the 'used' flag correctly
...
llvm-svn: 9366
2003-10-22 04:43:18 +00:00
Chris Lattner
a322b9b4f3
Loop over the module, not the symbol table. This makes the code handle
...
unused external functions again
llvm-svn: 9365
2003-10-22 04:42:20 +00:00
Chris Lattner
8d7712e9c5
Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll
...
llvm-svn: 9363
2003-10-22 03:35:34 +00:00
Misha Brukman
c40b8306f6
* Fix order of #includes to follow style guide
...
* It's no longer a BasicBlock pass: update comment on run() method
* Fix placement of braces to be consistent
* Delete extraneous whitespace
llvm-svn: 9361
2003-10-22 03:27:45 +00:00
Misha Brukman
f8d45938f8
Converted tabs to spaces.
...
llvm-svn: 9360
2003-10-22 03:10:26 +00:00
Chris Lattner
2ae188d8e3
Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll
...
llvm-svn: 9359
2003-10-21 23:17:56 +00:00
Chris Lattner
1519122fa7
Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
...
llvm-svn: 9357
2003-10-21 22:46:38 +00:00
Chris Lattner
4f65be9ac3
Fix message to make more sense and confuse Chris less
...
llvm-svn: 9354
2003-10-21 21:52:20 +00:00
Chris Lattner
5f4ed13cb9
Make sure to add a type for va_next operands, which may not other wise
...
occur in the module
llvm-svn: 9336
2003-10-21 17:40:54 +00:00
Chris Lattner
53d92d23b0
Fix problem which effected linking apache
...
llvm-svn: 9335
2003-10-21 17:39:59 +00:00
Chris Lattner
7a75f6b7d4
Hrm, unbreak stuph :(
...
llvm-svn: 9334
2003-10-21 17:22:23 +00:00
Chris Lattner
19f471f002
Fix preselection/lowerswitches bug
...
llvm-svn: 9333
2003-10-21 16:29:23 +00:00
Chris Lattner
2c063c848d
Pull the PHI special case into it's own visit* method
...
llvm-svn: 9332
2003-10-21 16:09:23 +00:00
Chris Lattner
4b8ce1c80d
The lastOp operand is never used
...
llvm-svn: 9331
2003-10-21 16:06:07 +00:00
John Criswell
4746befea3
Added LLVM copyright notice.
...
llvm-svn: 9324
2003-10-21 15:29:18 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
Chris Lattner
bec3b4ede1
Preselection is _not_ a basicblock pass, because it adds global variables to
...
the module. This change converts it from being a basic block pass to being
a simple pass. This allows elimination of the annotation and simplification
of the logic for moving constants into global variables.
llvm-svn: 9320
2003-10-21 14:49:19 +00:00
Vikram S. Adve
b289dff9a8
When opcodes like ADD were split into reg. and immed. versions (ADDi and ADDr),
...
this code wasn't fixed correctly so it missed copy operations that used ADDi.
llvm-svn: 9318
2003-10-21 12:29:45 +00:00
Vikram S. Adve
abf40e897c
Why does g++ not even generate a warning when you miss a break statement?
...
llvm-svn: 9317
2003-10-21 12:28:27 +00:00
Vikram S. Adve
062fda7446
Implement the new varargs instructions and intrinsics.
...
llvm-svn: 9316
2003-10-21 11:25:09 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
Chris Lattner
489483fe88
Convert this code from using annotations to using a local map
...
llvm-svn: 9310
2003-10-20 20:52:23 +00:00
Brian Gaeke
f9b97fda86
Goodbye, AddRegNumToValues
...
llvm-svn: 9309
2003-10-20 20:44:03 +00:00
Chris Lattner
e06b3121c8
Remove using declaration
...
llvm-svn: 9307
2003-10-20 20:38:17 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
d26c1d63f6
"Function"[0] == 'F', not 'M'
...
llvm-svn: 9297
2003-10-20 19:10:06 +00:00
Brian Gaeke
9501118e3b
Minor leftover fixups from replaceMachineCodeForFunction () change.
...
llvm-svn: 9295
2003-10-20 17:59:09 +00:00
Brian Gaeke
b4ceb43a43
Make replaceMachineCodeForFunction() return void.
...
llvm-svn: 9289
2003-10-20 15:17:12 +00:00
Brian Gaeke
afbe8787cc
Make replaceMachineCodeForFunction return void.
...
llvm-svn: 9288
2003-10-20 15:15:17 +00:00
Chris Lattner
332429f023
Apparently the dependencies are wrong for this file, so it didn't rebuild it
...
when changing Instruction.def. :(
llvm-svn: 9286
2003-10-20 14:12:52 +00:00
Chris Lattner
caf5825a8a
Reorder for minor efficiency gain
...
llvm-svn: 9285
2003-10-20 05:54:26 +00:00
Chris Lattner
c4f8226aaf
Emit x86 instructions for: A = B op C, where A and B are 16-bit registers,
...
C is a constant which can be sign-extended from 8 bits without value loss,
and op is one of: add, sub, imul, and, or, xor.
This allows the JIT to emit the one byte version of the constant instead of
the two or 4 byte version. Because these instructions are very common, this
can save a LOT of code space. For example, I sampled two benchmarks, 176.gcc
and 254.gap.
BM Old New Reduction
176.gcc 2673621 2548962 4.89%
254.gap 498261 475104 4.87%
Note that while the percentage is not spectacular, this did eliminate
124.6 _KILOBYTES_ of codespace from gcc. Not bad.
Note that this doesn't effect the llc version at all, because the assembler
already does this optimization.
llvm-svn: 9284
2003-10-20 05:53:31 +00:00
Chris Lattner
bdc522f19d
Hrm, a relic from the past. How cute :)
...
llvm-svn: 9283
2003-10-20 05:45:49 +00:00
Chris Lattner
c83d8249cb
Further cleanups and simplifications
...
llvm-svn: 9282
2003-10-20 04:48:06 +00:00
Chris Lattner
fce0650cee
Eliminate code for pointer size and endianness emulation.
...
llvm-svn: 9281
2003-10-20 04:11:23 +00:00
Misha Brukman
be506fc1c5
The Grammar Police was here.
...
llvm-svn: 9280
2003-10-20 04:03:10 +00:00
Chris Lattner
5a577c0b28
* Rename X86::IMULr16 -> X86::IMULrr16
...
* Implement R1 = R2 * C where R1 and R2 are 32 or 16 bits. This avoids an
extra copy into a register, reducing register pressure.
llvm-svn: 9278
2003-10-20 03:42:58 +00:00
Chris Lattner
7a4e225f37
Eliminate unused class
...
llvm-svn: 9270
2003-10-19 21:39:41 +00:00
Chris Lattner
87843f87b8
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
...
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
3d519c7bab
* Multiplications by 2^X are turned into shifts. This factors code out of the
...
getelementptr code path for use by other code paths (like malloc and alloca).
* Optimize comparisons with zero
* Generate neg, not, inc, and dec instructions, when possible.
This gives some code size wins, which might translate into performance. We'll
see tommorow in the nightly tester.
llvm-svn: 9267
2003-10-19 21:09:10 +00:00
Chris Lattner
57825f087d
Add some new instructions. Wheee
...
llvm-svn: 9266
2003-10-19 19:25:35 +00:00
Chris Lattner
9107ee3a11
.string adds an implicit zero at the end. This is not what we wanted.
...
This fixes PR#44.
llvm-svn: 9252
2003-10-19 02:51:01 +00:00
Chris Lattner
9a758cd924
Add debugtype, make output marginally more nice
...
llvm-svn: 9251
2003-10-19 02:27:40 +00:00
Chris Lattner
5c98a2d33a
Fix PR #47
...
llvm-svn: 9250
2003-10-19 02:14:58 +00:00
Chris Lattner
de87c8a892
Fix bug: Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.llx
...
This also fixes miscompilation of 176.gcc.
llvm-svn: 9249
2003-10-19 00:26:11 +00:00
Chris Lattner
27798b47fb
Without this option, the -run-llc mode does not work with shared objects at
...
all, making it pointless for use with the code generator debugger. With it,
it works like a charm.
llvm-svn: 9245
2003-10-18 21:54:47 +00:00
Chris Lattner
620cb7e35a
Fix warning
...
llvm-svn: 9236
2003-10-18 19:48:10 +00:00
Chris Lattner
3ff64cf568
add support for new linkage types
...
llvm-svn: 9228
2003-10-18 06:30:21 +00:00
Chris Lattner
e4a69325ff
Fix PR#50
...
llvm-svn: 9227
2003-10-18 06:14:59 +00:00
Chris Lattner
29825508f0
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Chris Lattner
ae52a1b309
ADd support for the new varargs instructions
...
llvm-svn: 9225
2003-10-18 05:56:52 +00:00
Chris Lattner
0a276257ae
Add support for the new varargs intrinsics
...
llvm-svn: 9224
2003-10-18 05:56:40 +00:00
Chris Lattner
080765e65d
Update the sparc backend to at least compile correctly with the new varargs stuff even if it's not all implemented yet.
...
llvm-svn: 9223
2003-10-18 05:55:58 +00:00
Chris Lattner
79135c051e
Interpret the new varargs intrinsics correctly
...
llvm-svn: 9222
2003-10-18 05:55:25 +00:00
Chris Lattner
e4fc9caea1
Updated to emit the final 1.0 bytecode format. This supports weak linkage,
...
more efficient encoding of varargs calls, and the new varargs intrinsics.
llvm-svn: 9221
2003-10-18 05:54:48 +00:00
Chris Lattner
3f700e8e47
* New revised variable argument handling support
...
* More dense bytecode encoding for varargs calls (like printf)
* Eliminated the extremely old bytecode format. rev #0 is now 1.0
llvm-svn: 9220
2003-10-18 05:54:18 +00:00
Chris Lattner
d0e3a15a9e
New revised variable argument handling support
...
llvm-svn: 9219
2003-10-18 05:53:13 +00:00
Misha Brukman
a35a69da97
Chris says it's better to assert that TheModule is valid than silently return 0.
...
llvm-svn: 9212
2003-10-17 21:59:57 +00:00
Brian Gaeke
821c0e653c
You can't just blat the address into memory, you have to blat its
...
displacement.
llvm-svn: 9210
2003-10-17 21:47:25 +00:00
Misha Brukman
546d6e6764
Don't release the Module, as that invalidates the Module* within the
...
ModuleProvider, which has bad consequences in lli::callAsMain() which tries to
access that same Module*.
llvm-svn: 9205
2003-10-17 18:31:59 +00:00
Brian Gaeke
21797d71d9
Implement replaceMachineCodeForFunction() for x86.
...
llvm-svn: 9204
2003-10-17 18:27:46 +00:00
Brian Gaeke
e966765990
Refactor jump insertion code from CompilationCallback() into insertJumpAtAddr().
...
Make insertFarJumpAtAddr() return void, because nothing uses its return value.
Remove some commented-out code.
Implement replaceMachineCodeForFunction() for SPARC.
llvm-svn: 9203
2003-10-17 18:27:37 +00:00
Brian Gaeke
4380148f33
Add prototype for replaceMachineCodeForFunction().
...
llvm-svn: 9202
2003-10-17 18:27:25 +00:00
Misha Brukman
d32cfacbc7
Return the Module that we just materialized.
...
llvm-svn: 9201
2003-10-17 18:27:13 +00:00
Brian Gaeke
eaf7472fd7
Tidy up doxygen comment for getPointerToFunction().
...
Add prototypes for recompileAndRelinkFunction() and runJITOnFunction().
llvm-svn: 9200
2003-10-17 18:27:12 +00:00
Brian Gaeke
7b9b6dbd63
Refactor running the JIT passes on a single function into the new method,
...
runJITOnFunction().
Add new method for recompiling and patching in new versions of functions,
recompileAndRelinkFunction().
llvm-svn: 9199
2003-10-17 18:27:00 +00:00
Brian Gaeke
7157eed00f
Remove extra blank line.
...
llvm-svn: 9196
2003-10-17 18:09:10 +00:00
Chris Lattner
67a86ccbed
Do not crash on empty structures
...
llvm-svn: 9195
2003-10-17 18:03:54 +00:00
Chris Lattner
17f8f2e317
Tighten up handling of checks for shift instructions
...
llvm-svn: 9191
2003-10-17 05:11:44 +00:00
Alkis Evlogimenos
5a1f705c88
Eliminate some extraneous code in SlotCalculator::insertVal().
...
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().
llvm-svn: 9190
2003-10-17 02:02:40 +00:00
Brian Gaeke
edea9eca83
Fix typo in comment.
...
llvm-svn: 9187
2003-10-16 23:45:05 +00:00
Brian Gaeke
9b4da738dd
Fix a typo in a comment, and zap a blank line.
...
llvm-svn: 9184
2003-10-16 23:33:38 +00:00
Misha Brukman
54c766e934
Add separator between different types of readers.
...
llvm-svn: 9183
2003-10-16 21:19:54 +00:00
Misha Brukman
d5c9118c89
JIT.cpp:
...
* #include "llvm/ModuleProvider"
* alphabetize #includes
* omit extraneous parens in pointer expressions
VM.cpp:
* #include "llvm/ModuleProvider"
* alphabetize #includes
llvm-svn: 9182
2003-10-16 21:19:34 +00:00
Misha Brukman
45a9016e1d
* Reorder includes as per the style guide
...
* Move the constructors from .h file here
* Document ExecutionEngine::create()
* Catch exception possibly thrown by ModuleProvider::releaseModule()
llvm-svn: 9181
2003-10-16 21:18:05 +00:00
Chris Lattner
39b976aed8
Minor cleanups
...
llvm-svn: 9177
2003-10-16 20:12:13 +00:00
Chris Lattner
f46c45682a
Add support for 'weak' linkage.
...
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
2bdaaa4e08
Add support for 'weak' linkage.
...
For now, we translate linkonce into weak linkage in the bytecode format because
we don't have enough bits to represent it. We will rev the bytecode version
soon anyways, so this will be fixed in the near future.
llvm-svn: 9170
2003-10-16 18:28:50 +00:00
Chris Lattner
09ef1749f7
Completely rewrite support for the Value::use_* list. Now, all operations on
...
this list (except use_size()) are constant time. Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.
This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:
176.gcc: 77.07s -> 37.38s
177.mesa: 7.59s -> 5.57s
252.eon: 21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap: 7.25s -> 7.42s
252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.
llvm-svn: 9160
2003-10-16 16:53:07 +00:00
Chris Lattner
f0da6e06e6
This code does not require random access use_lists
...
llvm-svn: 9156
2003-10-16 16:49:12 +00:00
Chris Lattner
0747f39327
Eliminate using declaration
...
Rewrite code to work with use_lists what are either random access or bidirectional
llvm-svn: 9155
2003-10-16 16:48:53 +00:00
Chris Lattner
eab4a2d0d1
#include vector which we will need here soon
...
llvm-svn: 9144
2003-10-15 22:09:32 +00:00
Brian Gaeke
255e770272
Fix up error message.
...
llvm-svn: 9139
2003-10-15 20:46:58 +00:00
Chris Lattner
f2ed60c0b7
Decrease usage of use_size()
...
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
c6778e91f4
Cleanup
...
llvm-svn: 9133
2003-10-15 16:42:21 +00:00
Chris Lattner
ac95730fca
Generalize abstract interpreter interface to allow linking in an arbitrary number of shared objects
...
llvm-svn: 9129
2003-10-14 21:52:52 +00:00
Misha Brukman
50fa0a7bae
Order #includes as per the style guide.
...
llvm-svn: 9128
2003-10-14 21:42:11 +00:00
Misha Brukman
1d9479ba78
Enabling incremental bytecode loading in the JIT:
...
* FunctionPassManager ctor now takes in a ModuleProvider
* run() materializes function before running passes on it
llvm-svn: 9126
2003-10-14 21:38:42 +00:00
Misha Brukman
5252af2728
Enabling incremental bytecode loading in the JIT:
...
* The VM is now constructed with a ModuleProvider
llvm-svn: 9125
2003-10-14 21:37:41 +00:00
Misha Brukman
cc1cfd01ed
Enabling incremental bytecode loading in the JIT:
...
* ExecutionEngine and VM can be constructed using a ModuleProvider.
llvm-svn: 9124
2003-10-14 21:36:31 +00:00
Chris Lattner
1cad7eb7b0
Substantial cleanups:
...
* Add header comment
* Remove extraneous #includes
* Move the FileType enum into the GCC class
* The GCC class is not virtual.
* Move all of the "constructor" functions into the classes themselves
* Stop using cl::list as arguments, use std::vector instead (which cl::list
derives from)
* Improve comments
llvm-svn: 9121
2003-10-14 21:34:11 +00:00
Chris Lattner
187faf250c
Actually return an error if something bad happens, don't just exit.
...
llvm-svn: 9119
2003-10-14 21:07:25 +00:00
Chris Lattner
c115e75755
Output a contorted sequence of instructions to make sure that we don't access
...
off the bottom of the stack. This fixes PR#41
llvm-svn: 9114
2003-10-14 19:09:05 +00:00
Chris Lattner
907de53acb
Disable the leaf function optimization, which is apparently not legal on
...
X86/linux. :( The problem is that a signal delivered while the function
is executing could clobber the functions stack. This is a partial fix
for PR41.
llvm-svn: 9113
2003-10-14 18:52:41 +00:00
Chris Lattner
a567862e89
Do not move variable sized allocations to the top of the caller, which might
...
break dominance relationships, and is otherwise bad. This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll. This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)
llvm-svn: 9109
2003-10-14 01:11:07 +00:00
Chris Lattner
55c1da7877
Do not allow fallthroughs in switch statements. This fixes PR37,
...
253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c!
llvm-svn: 9101
2003-10-13 20:32:04 +00:00
Brian Gaeke
add2fc5294
Remove WordsEmitted statistic; there's already a non-backend-specific
...
jello statistic for this (just divide #-bytes-of-code-emitted by 4).
Rewrite head-of-file comment.
llvm-svn: 9098
2003-10-13 19:51:20 +00:00
Chris Lattner
be8bc81ce0
LLI no longer has -abort-on-exception
...
llvm-svn: 9097
2003-10-13 18:26:49 +00:00
Chris Lattner
9506b0d6e2
Use the autoconf macro John wrote
...
llvm-svn: 9095
2003-10-13 17:13:53 +00:00