1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

44868 Commits

Author SHA1 Message Date
Owen Anderson
8d12de1c25 Fix a crash in the pre-alloc splitter exposed by recent codegen changes.
llvm-svn: 65121
2009-02-20 10:02:23 +00:00
Owen Anderson
9268f1ec92 Add a quick pass to the stack slot colorer to eliminate some trivially redundant spills after coloring.
Ideally these would never get created in the first place, but until we enhance the spiller to have a more
global picture of what's happening, this is necessary for code quality in some circumstances.

llvm-svn: 65120
2009-02-20 09:11:36 +00:00
Chris Lattner
c25ea86424 make these tests pass when run on a G5.
llvm-svn: 65117
2009-02-20 07:10:11 +00:00
Dan Gohman
4e8fc41d48 Implement "superhero" strength reduction, or full strength
reduction of address calculations down to basic pointer arithmetic.
This is currently off by default, as it needs a few other features
before it becomes generally useful. And even when enabled, full
strength reduction is only performed when it doesn't increase
register pressure, and when several other conditions are true.

This also factors out a bunch of exisiting LSR code out of
StrengthReduceStridedIVUsers into separate functions, and tidies
up IV insertion. This actually decreases register pressure even
in non-superhero mode. The change in iv-users-in-other-loops.ll
is an example of this; there are two more adds because there are
two fewer leas, and there is less spilling.

llvm-svn: 65108
2009-02-20 04:17:46 +00:00
Bill Wendling
75751a4769 Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
llvm-svn: 65092
2009-02-20 00:44:43 +00:00
Bill Wendling
9a2bbc9d15 Add a default debug location object to the Machine Function. It's used to emit a default debugging label at the beginning of a function.
llvm-svn: 65091
2009-02-20 00:42:52 +00:00
Bill Wendling
983f839148 Temporarily revert r65065. It was causing test failures.
llvm-svn: 65068
2009-02-19 21:57:07 +00:00
Bill Wendling
1c0692657d Print out debug info when printing the machine instruction.
llvm-svn: 65067
2009-02-19 21:44:55 +00:00
Bill Wendling
9af8f830c0 Check for -fast here too.
llvm-svn: 65065
2009-02-19 21:23:54 +00:00
Bill Wendling
4a86875529 Generate these labels when we're in "fast" mode, not simply when we're no in
"optimize-for-size" mode.

llvm-svn: 65064
2009-02-19 21:12:54 +00:00
Dale Johannesen
bd87541147 Describe tail merging's use of InsertBranch.
llvm-svn: 65062
2009-02-19 19:40:21 +00:00
Dan Gohman
eb7aa11e26 Use DEBUG() instead of passing *DOUT to WriteAsOperand,
since the latter just passes a null reference when
debugging is not enabled.

llvm-svn: 65060
2009-02-19 19:32:06 +00:00
Dan Gohman
9c41f5e046 Make the debug output of LSR less cryptic and more informative.
llvm-svn: 65057
2009-02-19 19:23:27 +00:00
Bill Wendling
2666a629bd Print out a new label only if the debug location *tuple* is different. The debug
locations may change, but the tuples may be the same.

llvm-svn: 65039
2009-02-19 09:16:38 +00:00
Bill Wendling
a7909157af Forgot to check that debug information is supported.
llvm-svn: 65034
2009-02-19 08:06:12 +00:00
Nick Lewycky
ed12d48f3d Regenerate.
llvm-svn: 65020
2009-02-19 06:18:56 +00:00
Nick Lewycky
9f25c115cb Default to building with position independent code. This may increase LLVM's
run time but will make LLVM easier to use as a library.

llvm-svn: 65019
2009-02-19 06:18:24 +00:00
Chris Lattner
2683c5bc9a If an executable is run through a symlink, dladdr will return the
symlink.  We really want the ultimate executable being run, not
the symlink.  This lets clang find its headers when invoked through
a symlink. rdar://6602012

llvm-svn: 65017
2009-02-19 05:34:35 +00:00
Dan Gohman
e7a4098f7a Fix the logic in this assertion to properly validate the number
of arguments.

llvm-svn: 64999
2009-02-19 02:55:18 +00:00
Dan Gohman
d4a9fb3478 Reapply r57340. VMKit does not presently rely on materializeFunction
being called with the lock released, and this fixes a race condition
in the JIT as used by lli.

llvm-svn: 64997
2009-02-19 02:40:15 +00:00
Bill Wendling
e4786f67e6 Temporarily XFAIL this test.
llvm-svn: 64987
2009-02-19 00:13:55 +00:00
Bill Wendling
306b992133 Put code that generates debug labels into TableGen so that it can be used by
everyone.

llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Chris Lattner
fc11ee35c5 add proper asmwriter and asmparser support for anonymous functions.
llvm-svn: 64953
2009-02-18 21:48:13 +00:00
Duncan Sands
d1fef83598 In theory the aliasee may have dead constant users
here.  Since we only do the transform if there is
one use, strip off any such users in the hope of
making the transform fire more often.

llvm-svn: 64926
2009-02-18 17:55:38 +00:00
Rafael Espindola
86b3bf5add really fix style
llvm-svn: 64923
2009-02-18 17:49:06 +00:00
Devang Patel
bf7153b721 The subprogram die may not exist while creating "default" scope.
llvm-svn: 64920
2009-02-18 17:29:38 +00:00
Dan Gohman
451474da4a Use a sign-extend instead of a zero-extend when promoting a
trip count value when the original loop iteration condition is
signed and the canonical induction variable won't undergo signed
overflow. This isn't required for correctness; it just preserves
more information about original loop iteration values.

Add a getTruncateOrSignExtend method to ScalarEvolution,
following getTruncateOrZeroExtend.

llvm-svn: 64918
2009-02-18 17:22:41 +00:00
Dan Gohman
5530918aff Simplify by using dyn_cast instead of isa and cast.
llvm-svn: 64917
2009-02-18 16:54:33 +00:00
Dan Gohman
5ce716719b Clarify the definition of "latch block" in a comment.
llvm-svn: 64916
2009-02-18 16:43:19 +00:00
Dan Gohman
30770ee7b3 Add explicit keywords.
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Nate Begeman
5e78e558ff Add support to the JIT for true non-lazy operation. When a call to a function
that has not been JIT'd yet, the callee is put on a list of pending functions
to JIT.  The call is directed through a stub, which is updated with the address
of the function after it has been JIT'd.  A new interface for allocating and
updating empty stubs is provided.

Add support for removing the ModuleProvider the JIT was created with, which
would otherwise invalidate the JIT's PassManager, which is initialized with the
ModuleProvider's Module.

Add support under a new ExecutionEngine flag for emitting the infomration 
necessary to update Function and GlobalVariable stubs after JITing them, by
recording the address of the stub and the name of the GlobalValue.  This allows
code to be copied from one address space to another, where libraries may live
at different virtual addresses, and have the stubs updated with their new
correct target addresses.

llvm-svn: 64906
2009-02-18 08:31:02 +00:00
Rafael Espindola
3435277172 fix style
llvm-svn: 64905
2009-02-18 08:30:15 +00:00
Owen Anderson
9d3e18ed39 Add a test for r61358, which I forgot to add way back when.
llvm-svn: 64904
2009-02-18 07:50:22 +00:00
Dan Gohman
9c258bd2ec Factor out the code to add a MachineOperand to a MachineInstrBuilder.
llvm-svn: 64891
2009-02-18 05:45:50 +00:00
Dan Gohman
0e73582689 Eliminate several more unnecessary intptr_t casts.
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Dan Gohman
4ed0aa2409 Change the argument type in this test to something less convoluted,
since it isn't actually used. 

llvm-svn: 64883
2009-02-18 04:25:04 +00:00
Evan Cheng
bd63a1f40d GV with null value initializer shouldn't go to BSS if it's meant for a mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well.
llvm-svn: 64877
2009-02-18 02:19:52 +00:00
Chris Lattner
733259fd3a allow TimeRegion to take a potentially-null pointer to a
timer for clang.

llvm-svn: 64874
2009-02-18 01:48:17 +00:00
Dan Gohman
3fc2e67140 Fix a corner case in the new indvars promotion logic: if there
are multiple IV's in a loop, some of them may under go signed
or unsigned wrapping even if the IV that's used in the loop
exit condition doesn't. Restrict sign-extension-elimination
and zero-extension-elimination to only those that operate on
the original loop-controlling IV.

llvm-svn: 64866
2009-02-18 00:52:00 +00:00
Dan Gohman
4f0fccdf9b Fix a typo in a comment.
llvm-svn: 64859
2009-02-18 00:08:39 +00:00
Duncan Sands
e605b83258 If an alias is dead and so is its aliasee, then globaldce would
crash because the alias would still be using the aliasee when the
aliasee was deleted.

llvm-svn: 64844
2009-02-17 23:05:26 +00:00
Devang Patel
50ec8ea3ee And now, not so elegant, test case...
llvm-svn: 64838
2009-02-17 22:48:18 +00:00
Devang Patel
6ae4cb364b Remove changes that were accidently included in previous commit.
llvm-svn: 64835
2009-02-17 22:45:18 +00:00
Devang Patel
25f2741ae9 The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number.

llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Scott Michel
4c5fa6c982 Remove trailing whitespace to reduce later commit patch noise.
(Note: Eventually, commits like this will be handled via a pre-commit hook that
 does this automagically, as well as expand tabs to spaces and look for 80-col
 violations.)

llvm-svn: 64827
2009-02-17 22:15:04 +00:00
Devang Patel
1d4e0292fb Emit debug info for bitfields.
llvm-svn: 64815
2009-02-17 21:23:59 +00:00
Rafael Espindola
c5a5171d1b tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.

llvm-svn: 64812
2009-02-17 21:08:21 +00:00
Dan Gohman
ced54f0173 LoopIndexSplit doesn't actually use ScalarEvolution.
llvm-svn: 64811
2009-02-17 20:50:11 +00:00
Dan Gohman
59b08852dc Add a method to ScalarEvolution for telling it when a loop has been
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.

llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Chris Lattner
0837686a2a commit a tweaked version of Daniel's patch for PR3599. We now
eliminate all the extensions and all but the one required truncate
from the testcase, but the or/and/shift stuff still isn't zapped.

llvm-svn: 64809
2009-02-17 20:47:23 +00:00